com.ibm.commons.util
Class QuickSort.StringArray
java.lang.Object
com.ibm.commons.util.QuickSort
com.ibm.commons.util.QuickSort.StringArray
- Enclosing class:
- QuickSort
public static class QuickSort.StringArray
- extends QuickSort
Quicksort class used to sort an array of Strings.
Method Summary |
int |
compare(int idx1,
int idx2)
Compare 2 elements in the collection, based on their index. |
int |
compare(java.lang.String s1,
java.lang.String s2)
|
void |
exchange(int idx1,
int idx2)
Exchange 2 elements in the collection, based on their index. |
int |
getCount()
Returns the number of elements in the collection. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QuickSort.StringArray
public QuickSort.StringArray(java.lang.String[] array,
int first,
int count,
boolean ignoreCase)
QuickSort.StringArray
public QuickSort.StringArray(java.lang.String[] array,
boolean ignoreCase)
QuickSort.StringArray
public QuickSort.StringArray(java.lang.String[] array)
getCount
public int getCount()
- Description copied from class:
QuickSort
- Returns the number of elements in the collection.
- Specified by:
getCount
in class QuickSort
compare
public int compare(int idx1,
int idx2)
- Description copied from class:
QuickSort
- Compare 2 elements in the collection, based on their index.
- Specified by:
compare
in class QuickSort
compare
public int compare(java.lang.String s1,
java.lang.String s2)
exchange
public void exchange(int idx1,
int idx2)
- Description copied from class:
QuickSort
- Exchange 2 elements in the collection, based on their index.
- Specified by:
exchange
in class QuickSort