java.lang.Object
org.apache.lucene.util.Sorter
org.apache.lucene.util.InPlaceMergeSorter
org.apache.lucene.util.ArrayInPlaceMergeSorter<T>
An
InPlaceMergeSorter for object arrays.-
Field Summary
FieldsFields inherited from class org.apache.lucene.util.Sorter
BINARY_SORT_THRESHOLD, INSERTION_SORT_THRESHOLD -
Constructor Summary
ConstructorsConstructorDescriptionArrayInPlaceMergeSorter(T[] arr, Comparator<? super T> comparator) Create a newArrayInPlaceMergeSorter. -
Method Summary
Methods inherited from class org.apache.lucene.util.InPlaceMergeSorter
mergeSort, sortMethods inherited from class org.apache.lucene.util.Sorter
binarySort, binarySort, checkRange, comparePivot, doRotate, heapChild, heapify, heapParent, heapSort, insertionSort, lower, lower2, mergeInPlace, reverse, rotate, setPivot, siftDown, upper, upper2
-
Field Details
-
arr
-
comparator
-
-
Constructor Details
-
ArrayInPlaceMergeSorter
Create a newArrayInPlaceMergeSorter.
-
-
Method Details
-
compare
protected int compare(int i, int j) Description copied from class:SorterCompare entries found in slotsiandj. The contract for the returned value is the same asComparator.compare(Object, Object). -
swap
protected void swap(int i, int j) Description copied from class:SorterSwap values at slotsiandj.
-