public final class Key extends java.lang.Object implements java.lang.Comparable<Key>
Modifier and Type | Class and Description |
---|---|
static class |
Key.DumpType |
Modifier and Type | Field and Description |
---|---|
static Key.DumpType |
DUMP_TYPE |
static byte[] |
EMPTY_KEY |
Constructor and Description |
---|
Key(byte[] key)
Construct a new key from a byte array.
|
Modifier and Type | Method and Description |
---|---|
static int |
compareKeys(byte[] key1,
byte[] key2,
java.util.Comparator<byte[]> comparator)
Compare keys with an optional comparator.
|
static int |
compareKeys(byte[] key1,
int off1,
int len1,
byte[] key2,
int off2,
int len2,
java.util.Comparator<byte[]> comparator)
Compare keys with an optional comparator.
|
int |
compareTo(Key argKey)
Compare two keys.
|
static int |
compareUnsignedBytes(byte[] key1,
int off1,
int len1,
byte[] key2,
int off2,
int len2)
Compare using a default unsigned byte comparison.
|
static byte[] |
createKeyPrefix(byte[] key1,
byte[] key2) |
static java.lang.String |
dumpString(byte[] key,
int nspaces) |
boolean |
equals(java.lang.Object o)
Support Set of Key in BINReference.
|
byte[] |
getKey()
Get the byte array for the key.
|
static int |
getKeyPrefixLength(byte[] key1,
int a1Len,
byte[] key2) |
static java.lang.String |
getNoFormatString(byte[] key)
Print the string w/out XML format.
|
int |
hashCode()
Support HashSet of Key in BINReference.
|
static byte[] |
makeKey(DatabaseEntry dbt) |
public static Key.DumpType DUMP_TYPE
public static final byte[] EMPTY_KEY
public static byte[] makeKey(DatabaseEntry dbt)
public byte[] getKey()
public int compareTo(Key argKey)
compareTo
in interface java.lang.Comparable<Key>
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static int compareKeys(byte[] key1, int off1, int len1, byte[] key2, int off2, int len2, java.util.Comparator<byte[]> comparator)
public static int compareKeys(byte[] key1, byte[] key2, java.util.Comparator<byte[]> comparator)
public static int compareUnsignedBytes(byte[] key1, int off1, int len1, byte[] key2, int off2, int len2)
public static int getKeyPrefixLength(byte[] key1, int a1Len, byte[] key2)
public static byte[] createKeyPrefix(byte[] key1, byte[] key2)
public static java.lang.String dumpString(byte[] key, int nspaces)
public static java.lang.String getNoFormatString(byte[] key)
Copyright (c) 2004-2012 Oracle. All rights reserved.