org.apache.hadoop.hbase.filter
Class LongComparator
java.lang.Object
org.apache.hadoop.hbase.filter.ByteArrayComparable
org.apache.hadoop.hbase.filter.LongComparator
- All Implemented Interfaces:
- Comparable<byte[]>
@InterfaceAudience.Public
@InterfaceStability.Stable
public class LongComparator
- extends ByteArrayComparable
A long comparator which numerical compares against the specified byte array
Method Summary |
int |
compareTo(byte[] value,
int offset,
int length)
Special compareTo method for subclasses, to avoid
copying byte[] unnecessarily. |
static LongComparator |
parseFrom(byte[] pbBytes)
|
byte[] |
toByteArray()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LongComparator
public LongComparator(long value)
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 LongComparator parseFrom(byte[] pbBytes)
throws org.apache.hadoop.hbase.exceptions.DeserializationException
- Parameters:
pbBytes
- A pb serialized BinaryComparator
instance
- Returns:
- An instance of
BinaryComparator
made from bytes
- Throws:
org.apache.hadoop.hbase.exceptions.DeserializationException
- See Also:
toByteArray()
Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.