Package org.apache.hadoop.hbase.filter
Class NullComparator
java.lang.Object
org.apache.hadoop.hbase.filter.ByteArrayComparable
org.apache.hadoop.hbase.filter.NullComparator
- All Implemented Interfaces:
Comparable<byte[]>
A binary comparator which lexicographically compares against the specified byte array using
Bytes.compareTo(byte[], byte[]).-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.filter.ByteArrayComparable
value -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) booleanReturns true if and only if the fields of the comparator that are serialized are equal to the corresponding fields in other.intcompareTo(byte[] value) 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.booleaninthashCode()static NullComparatorparseFrom(byte[] pbBytes) Parse the serialized representation ofNullComparatorbyte[]Returns The comparator serialized using pbMethods inherited from class org.apache.hadoop.hbase.filter.ByteArrayComparable
getValue
-
Constructor Details
-
NullComparator
public NullComparator()
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<byte[]>- Overrides:
compareToin classByteArrayComparable
-
equals
-
hashCode
-
compareTo
Description copied from class:ByteArrayComparableSpecial compareTo method for subclasses, to avoid copying byte[] unnecessarily.- Specified by:
compareToin classByteArrayComparable- 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
Description copied from class:ByteArrayComparableSpecial compareTo method for subclasses, to avoid copying bytes unnecessarily.- Overrides:
compareToin classByteArrayComparable- 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.
-
toByteArray
Returns The comparator serialized using pb- Specified by:
toByteArrayin classByteArrayComparable
-
parseFrom
Parse the serialized representation ofNullComparator- Parameters:
pbBytes- A pb serializedNullComparatorinstance- Returns:
- An instance of
NullComparatormade frombytes - Throws:
DeserializationException- if an error occurred- See Also:
-
areSerializedFieldsEqual
Returns true if and only if the fields of the comparator that are serialized are equal to the corresponding fields in other. Used for testing.- Overrides:
areSerializedFieldsEqualin classByteArrayComparable
-