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[]>
@InterfaceAudience.Public
@InterfaceStability.Stable
public class NullComparator
- extends ByteArrayComparable
A binary comparator which lexicographically compares against the specified
byte array using Bytes.compareTo(byte[], byte[])
.
NullComparator
public NullComparator()
compareTo
public int compareTo(byte[] value)
- Specified by:
compareTo
in interface Comparable<byte[]>
- Overrides:
compareTo
in class ByteArrayComparable
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
compareTo
public int compareTo(byte[] value,
int offset,
int length)
- Description copied from class:
ByteArrayComparable
- Special compareTo method for subclasses, to avoid
copying byte[] unnecessarily.
- Specified by:
compareTo
in class ByteArrayComparable
- 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.
toByteArray
public byte[] toByteArray()
- Specified by:
toByteArray
in class ByteArrayComparable
- Returns:
- The comparator serialized using pb
parseFrom
public static NullComparator parseFrom(byte[] pbBytes)
throws DeserializationException
- Parameters:
pbBytes
- A pb serialized NullComparator
instance
- Returns:
- An instance of
NullComparator
made from bytes
- Throws:
DeserializationException
- See Also:
toByteArray()
Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.