@InterfaceAudience.Public public class BinaryComparator extends ByteArrayComparable
Bytes.compareTo(byte[], byte[]).value| Constructor and Description |
|---|
BinaryComparator(byte[] value)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
(package private) boolean |
areSerializedFieldsEqual(ByteArrayComparable other) |
int |
compareTo(byte[] value,
int offset,
int length)
Special compareTo method for subclasses, to avoid
copying byte[] unnecessarily.
|
int |
compareTo(ByteBuffer value,
int offset,
int length)
Special compareTo method for subclasses, to avoid copying bytes unnecessarily.
|
static BinaryComparator |
parseFrom(byte[] pbBytes) |
byte[] |
toByteArray() |
compareTo, getValuepublic BinaryComparator(byte[] value)
value - valuepublic int compareTo(byte[] value, int offset, int length)
ByteArrayComparablecompareTo in class ByteArrayComparablevalue - byte[] to compareoffset - offset into valuelength - number of bytes to comparepublic int compareTo(ByteBuffer value, int offset, int length)
ByteArrayComparablecompareTo in class ByteArrayComparablevalue - bytes to compare within a ByteBufferoffset - offset into valuelength - number of bytes to comparepublic byte[] toByteArray()
toByteArray in class ByteArrayComparablepublic static BinaryComparator parseFrom(byte[] pbBytes) throws DeserializationException
pbBytes - A pb serialized BinaryComparator instanceBinaryComparator made from bytesDeserializationExceptiontoByteArray()boolean areSerializedFieldsEqual(ByteArrayComparable other)
areSerializedFieldsEqual in class ByteArrayComparableother - Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.