@InterfaceAudience.Public @InterfaceStability.Stable public class BitComparator extends ByteArrayComparable
| Modifier and Type | Class and Description |
|---|---|
static class |
BitComparator.BitwiseOp
Bit operators.
|
| Modifier and Type | Field and Description |
|---|---|
protected BitComparator.BitwiseOp |
bitOperator |
| Constructor and Description |
|---|
BitComparator(byte[] value,
BitComparator.BitwiseOp bitOperator)
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.
|
BitComparator.BitwiseOp |
getOperator() |
static BitComparator |
parseFrom(byte[] pbBytes) |
byte[] |
toByteArray() |
compareTo, getValueprotected BitComparator.BitwiseOp bitOperator
public BitComparator(byte[] value,
BitComparator.BitwiseOp bitOperator)
value - valuebitOperator - operator to use on the bit comparisonpublic BitComparator.BitwiseOp getOperator()
public byte[] toByteArray()
toByteArray in class ByteArrayComparablepublic static BitComparator parseFrom(byte[] pbBytes) throws DeserializationException
pbBytes - A pb serialized BitComparator instanceBitComparator made from bytesDeserializationExceptiontoByteArray()public int compareTo(byte[] value,
int offset,
int length)
ByteArrayComparablecompareTo in class ByteArrayComparablevalue - byte[] to compareoffset - offset into valuelength - number of bytes to compareCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.