public final class Key extends Object implements 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,
Comparator<byte[]> comparator)
Compare keys with an optional comparator.
|
static int |
compareKeys(byte[] key1,
int off1,
int len1,
byte[] key2,
int off2,
int len2,
Comparator<byte[]> comparator)
Compare keys with an optional comparator.
|
static int |
compareKeys(DatabaseEntry entry1,
DatabaseEntry entry2,
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 String |
dumpString(byte[] key,
int nspaces) |
static String |
dumpString(byte[] key,
String xmltag,
int nspaces) |
boolean |
equals(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 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 Comparable<Key>public boolean equals(Object o)
public int hashCode()
public static int compareKeys(byte[] key1,
int off1,
int len1,
byte[] key2,
int off2,
int len2,
Comparator<byte[]> comparator)
public static int compareKeys(byte[] key1,
byte[] key2,
Comparator<byte[]> comparator)
public static int compareKeys(DatabaseEntry entry1, DatabaseEntry entry2, 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 String dumpString(byte[] key, int nspaces)
public static String getNoFormatString(byte[] key)
Copyright © 2024. All rights reserved.