public final class TeraKey extends Object implements Key
This class is a wrapper for the key part of the integer number.
| Modifier and Type | Field and Description |
|---|---|
static int |
KEY_SIZE
The size of the key in bytes.
|
| Constructor and Description |
|---|
TeraKey()
Default constructor required for serialization/deserialization.
|
TeraKey(byte[] srcBuf,
int offset)
Constructs a new key object.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Key arg0) |
void |
copyToBuffer(byte[] buf)
Copies the key to the given byte buffer.
|
boolean |
equals(Object obj) |
int |
hashCode() |
void |
read(DataInput in) |
void |
setValue(byte[] data,
int offset)
Sets the value of this key object.
|
String |
toString() |
void |
write(DataOutput out) |
public static final int KEY_SIZE
public TeraKey(byte[] srcBuf,
int offset)
srcBuf - The source buffer to read the key from.offset - The offset in the byte array where the key subsequence starts.public TeraKey()
public void setValue(byte[] data,
int offset)
data - The source buffer to read the key from.offset - The offset in the byte array where the key subsequence starts.public void write(DataOutput out) throws IOException
write in interface IOReadableWritableIOExceptionpublic void read(DataInput in) throws IOException
read in interface IOReadableWritableIOExceptionpublic int compareTo(Key arg0)
compareTo in interface Comparable<Key>public int hashCode()
public boolean equals(Object obj)
public void copyToBuffer(byte[] buf)
buf - the buffer to copy the key toCopyright © 2013. All rights reserved.