org.apache.hadoop.hbase.filter
Class ByteArrayComparable
java.lang.Object
org.apache.hadoop.hbase.filter.ByteArrayComparable
- All Implemented Interfaces:
- Comparable<byte[]>
- Direct Known Subclasses:
- BinaryComparator, BinaryPrefixComparator, BitComparator, LongComparator, NullComparator, RegexStringComparator, SubstringComparator
@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract class ByteArrayComparable
- extends Object
- implements Comparable<byte[]>
Base class for byte array comparators
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteArrayComparable
public ByteArrayComparable(byte[] value)
- Constructor.
- Parameters:
value
- the value to compare against
getValue
public byte[] getValue()
toByteArray
public abstract byte[] toByteArray()
- Returns:
- The comparator serialized using pb
parseFrom
public static ByteArrayComparable parseFrom(byte[] pbBytes)
throws DeserializationException
- Parameters:
pbBytes
- A pb serialized ByteArrayComparable
instance
- Returns:
- An instance of
ByteArrayComparable
made from bytes
- Throws:
DeserializationException
- See Also:
toByteArray()
compareTo
public int compareTo(byte[] value)
- Specified by:
compareTo
in interface Comparable<byte[]>
compareTo
public abstract int compareTo(byte[] value,
int offset,
int length)
- 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.
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.