com.icl.saxon.sort

Interface Sortable

public interface Sortable

A Sortable is an object that can be sorted using the QuickSort method.

Author: Michael H. Kay

Method Summary
intcompare(int a, int b)
Compare two objects within this Sortable, identified by their position.
voidswap(int a, int b)
Swap two objects within this Sortable, identified by their position.

Method Detail

compare

public int compare(int a, int b)
Compare two objects within this Sortable, identified by their position.

Returns: <0 if obj[a]0 if obj[a]>obj[b]

swap

public void swap(int a, int b)
Swap two objects within this Sortable, identified by their position.