Package com.complexible.common.base
Class Sorter<T>
java.lang.Object
com.complexible.common.base.Sorter<T>
- Direct Known Subclasses:
Sorter.QuickSorter
This class performs merge sort over an array but allocates the additional array used in merge sort upfront so if the
arrays of same size will be sorted repeatedly this sorter can be reused to minimize garbage collection with the price
of having memory for extra array always being used.
- Author:
- Evren Sirin
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSorter implementation for QuickSort. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Sorter<T> create(int length, Comparator<? super T> comp) abstract void
-
Field Details
-
c
-
-
Constructor Details
-
Sorter
-
-
Method Details
-
create
-
sort
-