|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.objexcel.util.Sorting
Sorting implements the quickSort algortithm. It also provides comparers for different classes.
Inner Class Summary | |
static class |
Sorting.Comparer
the interface used to compare (for sorting /searching purposes a and b |
static class |
Sorting.ObjectArrayComparer
adapts a comparer to expect an element at a given index of an array. |
static class |
Sorting.ReverseComparer
reversing the order of the given comparer |
Method Summary | |
static int |
binarySearch(java.lang.Object[] a,
java.lang.Object key,
Sorting.Comparer c)
find key in a according to c. |
static int |
binarySearch(java.util.Vector a,
java.lang.Object key,
Sorting.Comparer c)
find key in a according to c. |
Sorting.Comparer |
getComparer(java.lang.Class c)
get a comparer for the given class |
static Sorting |
getInstance()
get the singleton instance of Sorting |
Sorting.Comparer |
getReverseComparer(java.lang.Class c)
get the reverse order comparer for the given class |
void |
registerComparer(java.lang.Class c,
Sorting.Comparer comparer)
register your own comparer for a given class |
static void |
sort(java.lang.Object[] v,
Sorting.Comparer c)
sort v according to c |
static void |
sort(java.util.Vector v,
Sorting.Comparer c)
sort v according to c |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Method Detail |
public static Sorting getInstance()
public Sorting.Comparer getComparer(java.lang.Class c)
public Sorting.Comparer getReverseComparer(java.lang.Class c)
public void registerComparer(java.lang.Class c, Sorting.Comparer comparer)
public static void sort(java.util.Vector v, Sorting.Comparer c)
public static void sort(java.lang.Object[] v, Sorting.Comparer c)
public static int binarySearch(java.util.Vector a, java.lang.Object key, Sorting.Comparer c)
public static int binarySearch(java.lang.Object[] a, java.lang.Object key, Sorting.Comparer c)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |