Sorter
Base class for sorting algorithms implementations.
There are a number of subclasses to choose from that vary in performance and stability. We suggest that you pick the first from this ranked list that meets your requirements:
MSBRadixSorter for strings (array of bytes/chars). Not a stable sort.
StableMSBRadixSorter for strings (array of bytes/chars). Stable sort.
IntroSorter. Not a stable sort.
InPlaceMergeSorter. When the data to sort is typically small. Stable sort.
TimSorter. Stable sort.
Inheritors
Functions
A binary sort implementation. This performs O(n*log(n)) comparisons and O(n^2) swaps. It is typically used by more sophisticated implementations as a fall-back when the number of items to sort has become less than {@value #BINARY_SORT_THRESHOLD}. This algorithm is stable.
Use heap sort to sort items between from inclusive and to exclusive. This runs in O(n*log(n)) and is used as a fall-back by IntroSorter. This algorithm is NOT stable.
Sorts between from (inclusive) and to (exclusive) with insertion sort. Runs in O(n^2). It is typically used by more sophisticated implementations as a fall-back when the number of items to sort becomes less than {@value #INSERTION_SORT_THRESHOLD}. This algorithm is stable.