public class AddeEntryKeyAnalyzer extends Object implements PatriciaTrie.KeyAnalyzer<AddeEntry>
Modifier and Type | Field and Description |
---|---|
(package private) static org.slf4j.Logger |
logger |
EQUAL_BIT_KEY, NULL_BIT_KEY
Constructor and Description |
---|
AddeEntryKeyAnalyzer() |
Modifier and Type | Method and Description |
---|---|
int |
bitIndex(AddeEntry key,
int keyStart,
int keyLength,
AddeEntry found,
int foundStart,
int foundLength)
Returns the n-th different bit between key and found.
|
int |
bitsPerElement()
Returns the number of bits per element in the key.
|
int |
compare(AddeEntry o1,
AddeEntry o2) |
boolean |
isBitSet(AddeEntry key,
int keyLength,
int bitIndex)
Returns whether or not a bit is set
|
boolean |
isPrefix(AddeEntry prefix,
int offset,
int length,
AddeEntry key)
Determines whether or not the given prefix (from offset to length)
is a prefix of the given key.
|
int |
length(AddeEntry key)
Returns the length of the Key in bits.
|
private static String |
valAtIdx(int idx,
AddeEntry e) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
static final org.slf4j.Logger logger
public AddeEntryKeyAnalyzer()
public int bitIndex(AddeEntry key, int keyStart, int keyLength, AddeEntry found, int foundStart, int foundLength)
PatriciaTrie.KeyAnalyzer
bitIndex
in interface PatriciaTrie.KeyAnalyzer<AddeEntry>
public int bitsPerElement()
PatriciaTrie.KeyAnalyzer
bitsPerElement
in interface PatriciaTrie.KeyAnalyzer<AddeEntry>
public boolean isBitSet(AddeEntry key, int keyLength, int bitIndex)
PatriciaTrie.KeyAnalyzer
isBitSet
in interface PatriciaTrie.KeyAnalyzer<AddeEntry>
public boolean isPrefix(AddeEntry prefix, int offset, int length, AddeEntry key)
PatriciaTrie.KeyAnalyzer
isPrefix
in interface PatriciaTrie.KeyAnalyzer<AddeEntry>
true
if prefix
matches the given
offset
start and length
for key
.public int length(AddeEntry key)
PatriciaTrie.KeyAnalyzer
length
in interface PatriciaTrie.KeyAnalyzer<AddeEntry>
key
- Key whose length should be computed.key
.public int compare(AddeEntry o1, AddeEntry o2)
compare
in interface Comparator<AddeEntry>