BytesRefComparator

Specialized BytesRef comparator that StringSorter has optimizations for.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard
abstract fun byteAt(ref: BytesRef, i: Int): Int

Return the unsigned byte to use for comparison at index i, or -1 if all bytes that are useful for comparisons are exhausted. This may only be called with a value of i between 0 included and comparedBytesCount excluded.

Link copied to clipboard
open override fun compare(o1: BytesRef, o2: BytesRef): Int

open fun compare(o1: BytesRef, o2: BytesRef, k: Int): Int

Compare two bytes refs that first k bytes are already guaranteed to be equal.