|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.tree.Key
public final class Key
Key represents a JE B-Tree Key. Keys are immutable. Within JE, keys are usually represented as byte arrays rather than as Key instances in order to reduce the in-memory footprint. The static methods of this class are used to operate on the byte arrays. One exception is when keys are held within a collection. In that case, Key objects are instantiated so that keys are hashed and compared by value.
Field Summary | |
---|---|
static boolean |
DUMP_BINARY
|
static boolean |
DUMP_INT_BINDING
|
static byte[] |
EMPTY_KEY
|
Constructor Summary | |
---|---|
Key(byte[] key)
Construct a new key from a byte array. |
Method Summary | |
---|---|
static int |
compareKeys(byte[] key1,
byte[] key2)
|
int |
compareTo(Object o)
Compare two keys. |
static String |
dumpString(byte[] key,
int nspaces)
|
boolean |
equals(Object o)
Support Set of Key in BINReference. |
byte[] |
getKey()
Get the byte array for the key. |
static String |
getNoFormatString(byte[] key)
Print the string w/out XML format. |
int |
hashCode()
Support HashSet of Key in BINReference. |
static byte[] |
makeKey(DatabaseEntry dbt)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean DUMP_BINARY
public static boolean DUMP_INT_BINDING
public static final byte[] EMPTY_KEY
Constructor Detail |
---|
public Key(byte[] key)
Method Detail |
---|
public static byte[] makeKey(DatabaseEntry dbt)
public byte[] getKey()
public int compareTo(Object o)
compareTo
in interface Comparable
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public static int compareKeys(byte[] key1, byte[] key2)
public static String dumpString(byte[] key, int nspaces)
public static String getNoFormatString(byte[] key)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |