@InterfaceAudience.Public @InterfaceStability.Stable public class BinaryComparator extends ByteArrayComparable
Bytes.compareTo(byte[], byte[])
.Constructor and Description |
---|
BinaryComparator(byte[] value)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(byte[] value,
int offset,
int length)
Special compareTo method for subclasses, to avoid
copying byte[] unnecessarily.
|
static BinaryComparator |
parseFrom(byte[] pbBytes) |
byte[] |
toByteArray() |
compareTo, getValue
public BinaryComparator(byte[] value)
value
- valuepublic int compareTo(byte[] value, int offset, int length)
ByteArrayComparable
compareTo
in class ByteArrayComparable
value
- byte[] to compareoffset
- offset into valuelength
- number of bytes to comparepublic byte[] toByteArray()
toByteArray
in class ByteArrayComparable
public static BinaryComparator parseFrom(byte[] pbBytes) throws DeserializationException
pbBytes
- A pb serialized BinaryComparator
instanceBinaryComparator
made from bytes
DeserializationException
toByteArray()