Package org.apache.lucene.util
Class BytesRefComparator
- java.lang.Object
-
- org.apache.lucene.util.BytesRefComparator
-
- All Implemented Interfaces:
java.util.Comparator<BytesRef>
public abstract class BytesRefComparator extends java.lang.Object implements java.util.Comparator<BytesRef>
SpecializedBytesRefcomparator thatFixedLengthBytesRefArray.iterator(Comparator)has optimizations for.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) intcomparedBytesCount
-
Constructor Summary
Constructors Modifier Constructor Description protectedBytesRefComparator(int comparedBytesCount)Sole constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract intbyteAt(BytesRef ref, int i)Return the unsigned byte to use for comparison at indexi, or-1if all bytes that are useful for comparisons are exhausted.intcompare(BytesRef o1, BytesRef o2)
-
-
-
Method Detail
-
byteAt
protected abstract int byteAt(BytesRef ref, int i)
Return the unsigned byte to use for comparison at indexi, or-1if all bytes that are useful for comparisons are exhausted. This may only be called with a value ofibetween0included andcomparedBytesCountexcluded.
-
-