|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--Quicksort
Quicksort is a setup for sorting an array of objects using the Quicksort algorithm. Comparisons are done with an arbitrary Compartor.
| Field Summary | |
private java.lang.Object[] |
a
The array of Objects to be sorted. |
| Constructor Summary | |
Quicksort(java.lang.Object[] array)
Constructor for the Quicksort setup |
|
| Method Summary | |
void |
sort(java.util.Comparator comp)
Sort the array in place using the argument comparator |
void |
sort(int low,
int high,
java.util.Comparator comp)
Sort the array elements at indices from low to high, inclusive. |
void |
swap(int i,
int j)
swap(i, j) interchanges the values in a[i] and a[j] |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.lang.Object[] a
| Constructor Detail |
public Quicksort(java.lang.Object[] array)
| Method Detail |
public void sort(java.util.Comparator comp)
public void sort(int low,
int high,
java.util.Comparator comp)
public void swap(int i,
int j)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||