equals

fun equals(start: Int, b: BytesRef): Boolean

Computes the equality between the BytesRef at the start position with the provided BytesRef. This is equivalent of doing:

BytesRef bytes = new BytesRef();
fillTerm(bytes, start);
Arrays.equals(bytes.bytes, bytes.offset, bytes.offset + length, b.bytes, b.offset, b.offset + b.length);
*

It just saves the work of filling the BytesRef.