Package org.apache.lucene.util
Class StringSorter
java.lang.Object
org.apache.lucene.util.Sorter
org.apache.lucene.util.StringSorter
A
BytesRef
sorter tries to use a efficient radix sorter if cmp
is a
BytesRefComparator
, otherwise fallback to fallbackSorter(java.util.Comparator<org.apache.lucene.util.BytesRef>)
- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected final BytesRef
protected final BytesRefBuilder
protected final BytesRefBuilder
protected final BytesRefBuilder
protected final BytesRef
protected final BytesRef
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected int
compare
(int i, int j) Compare entries found in slotsi
andj
.protected Sorter
fallbackSorter
(Comparator<BytesRef> cmp) protected abstract void
get
(BytesRefBuilder builder, BytesRef result, int i) protected Sorter
void
sort
(int from, int to) Sort the slice which starts atfrom
(inclusive) and ends atto
(exclusive).Methods inherited from class org.apache.lucene.util.Sorter
comparePivot, setPivot, swap
-
Field Details
-
scratch1
-
scratch2
-
pivotBuilder
-
scratchBytes1
-
scratchBytes2
-
pivot
-
-
Constructor Details
-
StringSorter
-
-
Method Details
-
get
-
compare
protected int compare(int i, int j) Description copied from class:Sorter
Compare entries found in slotsi
andj
. The contract for the returned value is the same asComparator.compare(Object, Object)
. -
sort
public void sort(int from, int to) Description copied from class:Sorter
Sort the slice which starts atfrom
(inclusive) and ends atto
(exclusive). -
radixSorter
-
fallbackSorter
-