|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.commons.util.QuickSort
public abstract class QuickSort
Easy to use QuickSort set of classes for sorting data.
The QuickSort class is an abstract class that requires some of its methods to be overridden to give actual access to the collection.
Nested Class Summary | |
---|---|
static class |
QuickSort.IntArray
Quicksort class used to sort an array of integers. |
static class |
QuickSort.JavaList
Quicksort class used to sort a Java List. |
static class |
QuickSort.JavaVector
Quicksort class used to sort a Java Vector. |
static class |
QuickSort.ObjectArray
Quicksort class used to sort an array of objects. |
static class |
QuickSort.StringArray
Quicksort class used to sort an array of Strings. |
Constructor Summary | |
---|---|
QuickSort()
|
Method Summary | |
---|---|
abstract int |
compare(int idx1,
int idx2)
Compare 2 elements in the collection, based on their index. |
abstract void |
exchange(int idx1,
int idx2)
Exchange 2 elements in the collection, based on their index. |
abstract int |
getCount()
Returns the number of elements in the collection. |
void |
sort()
Sort the entire collection. |
void |
sort(int first,
int length)
Sort a subpart of the collection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QuickSort()
Method Detail |
---|
public void sort()
public void sort(int first, int length)
public abstract int getCount()
public abstract int compare(int idx1, int idx2)
public abstract void exchange(int idx1, int idx2)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |