Package org.apache.hadoop.hbase.filter
Class ByteArrayComparable
java.lang.Object
org.apache.hadoop.hbase.filter.ByteArrayComparable
- All Implemented Interfaces:
Comparable<byte[]>
- Direct Known Subclasses:
BigDecimalComparator,BinaryComparator,BinaryComponentComparator,BinaryPrefixComparator,BitComparator,LongComparator,NullComparator,RegexStringComparator,SubstringComparator
Base class for byte array comparators
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) booleanReturn true if and only if the fields of the comparator that are serialized are equal to the corresponding fields in other.intcompareTo(byte[] value) abstract intcompareTo(byte[] value, int offset, int length) Special compareTo method for subclasses, to avoid copying byte[] unnecessarily.intcompareTo(ByteBuffer value, int offset, int length) Special compareTo method for subclasses, to avoid copying bytes unnecessarily.byte[]getValue()static ByteArrayComparableparseFrom(byte[] pbBytes) Parse a serialized representation ofByteArrayComparableabstract byte[]Returns The comparator serialized using pb
-
Field Details
-
value
byte[] value
-
-
Constructor Details
-
ByteArrayComparable
Constructor.- Parameters:
value- the value to compare against
-
-
Method Details
-
getValue
-
toByteArray
Returns The comparator serialized using pb -
parseFrom
Parse a serialized representation ofByteArrayComparable- Parameters:
pbBytes- A pb serializedByteArrayComparableinstance- Returns:
- An instance of
ByteArrayComparablemade frombytes - Throws:
DeserializationException- See Also:
-
areSerializedFieldsEqual
Return true if and only if the fields of the comparator that are serialized are equal to the corresponding fields in other. -
compareTo
- Specified by:
compareToin interfaceComparable<byte[]>
-
compareTo
Special compareTo method for subclasses, to avoid copying byte[] unnecessarily.- Parameters:
value- byte[] to compareoffset- offset into valuelength- number of bytes to compare- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
-
compareTo
Special compareTo method for subclasses, to avoid copying bytes unnecessarily.- Parameters:
value- bytes to compare within a ByteBufferoffset- offset into valuelength- number of bytes to compare- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
-