com.ibm.commons.util
Class QuickSort.ObjectArray

java.lang.Object
  extended by com.ibm.commons.util.QuickSort
      extended by com.ibm.commons.util.QuickSort.ObjectArray
Enclosing class:
QuickSort

public static class QuickSort.ObjectArray
extends QuickSort

Quicksort class used to sort an array of objects.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.ibm.commons.util.QuickSort
QuickSort.IntArray, QuickSort.JavaList, QuickSort.JavaVector, QuickSort.ObjectArray, QuickSort.StringArray
 
Constructor Summary
QuickSort.ObjectArray(java.lang.Object[] array)
           
QuickSort.ObjectArray(java.lang.Object[] array, int first, int count)
           
 
Method Summary
 int compare(int idx1, int idx2)
          Compare 2 elements in the collection, based on their index.
 int compare(java.lang.Object o1, java.lang.Object o2)
           
 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.
 java.lang.Object getObject(int index)
           
 
Methods inherited from class com.ibm.commons.util.QuickSort
sort, sort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuickSort.ObjectArray

public QuickSort.ObjectArray(java.lang.Object[] array,
                             int first,
                             int count)

QuickSort.ObjectArray

public QuickSort.ObjectArray(java.lang.Object[] array)
Method Detail

getCount

public int getCount()
Description copied from class: QuickSort
Returns the number of elements in the collection.

Specified by:
getCount in class QuickSort

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

getObject

public java.lang.Object getObject(int index)

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.Object o1,
                   java.lang.Object o2)