@InterfaceAudience.Public public abstract class ByteArrayComparable extends Object implements Comparable<byte[]>
Constructor and Description |
---|
ByteArrayComparable(byte[] value)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(byte[] value) |
abstract int |
compareTo(byte[] value,
int offset,
int length)
Special compareTo method for subclasses, to avoid
copying byte[] unnecessarily.
|
int |
compareTo(ByteBuffer value,
int offset,
int length)
Special compareTo method for subclasses, to avoid copying bytes unnecessarily.
|
byte[] |
getValue() |
static ByteArrayComparable |
parseFrom(byte[] pbBytes) |
abstract byte[] |
toByteArray() |
public ByteArrayComparable(byte[] value)
value
- the value to compare againstpublic byte[] getValue()
public abstract byte[] toByteArray()
public static ByteArrayComparable parseFrom(byte[] pbBytes) throws org.apache.hadoop.hbase.exceptions.DeserializationException
pbBytes
- A pb serialized ByteArrayComparable
instanceByteArrayComparable
made from bytes
org.apache.hadoop.hbase.exceptions.DeserializationException
toByteArray()
public int compareTo(byte[] value)
compareTo
in interface Comparable<byte[]>
public abstract int compareTo(byte[] value, int offset, int length)
value
- byte[] to compareoffset
- offset into valuelength
- number of bytes to comparepublic int compareTo(ByteBuffer value, int offset, int length)
value
- bytes to compare within a ByteBufferoffset
- offset into valuelength
- number of bytes to compareCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.