public class Sorter extends Object
| Constructor and Description |
|---|
Sorter() |
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
partialQuickSort(List<T> objects,
int start,
int end,
boolean isSeriallySorted,
Comparator<T> comparator)
A method used to sort a list of objects using a specified comparator and
the partial quick sort algorithm
|
static <T> void |
quickSort(List<T> objects,
Comparator<T> comparator)
A method used to sort a list of objects using a specified comparator and
the quick sort algorithm
|
public static <T> void quickSort(List<T> objects, Comparator<T> comparator)
T - The Type of the List to sortobjects - -
The list to sortcomparator - -
The comparator to use during sortingpublic static <T> void partialQuickSort(List<T> objects, int start, int end, boolean isSeriallySorted, Comparator<T> comparator)
T - The Type of the List to sortobjects - -
The list to sortstart - -
The starting point of the list part to sort (inclusive)end - -
The ending point of the list part to sort (inclusive)isSeriallySorted - -
an indicator of whether the list is being serially sorted (ie.
are all parts before the current start index already sorted?)comparator - -
The comparator to use during sortingCopyright © 2014. All Rights Reserved.