public class StringListKeyAnalyzer extends Object implements PatriciaTrie.KeyAnalyzer<List<String>>
EQUAL_BIT_KEY, NULL_BIT_KEY
Constructor and Description |
---|
StringListKeyAnalyzer() |
Modifier and Type | Method and Description |
---|---|
int |
bitIndex(List<String> key,
int keyStart,
int keyLength,
List<String> 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(List<String> o1,
List<String> o2) |
boolean |
isBitSet(List<String> key,
int keyLength,
int bitIndex)
Returns whether or not a bit is set
|
boolean |
isPrefix(List<String> prefix,
int offset,
int length,
List<String> key)
Determines whether or not the given prefix (from offset to length)
is a prefix of the given key.
|
int |
length(List<String> key)
Returns the length of the Key in bits.
|
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
public StringListKeyAnalyzer()
public int bitIndex(List<String> key, int keyStart, int keyLength, List<String> found, int foundStart, int foundLength)
PatriciaTrie.KeyAnalyzer
bitIndex
in interface PatriciaTrie.KeyAnalyzer<List<String>>
public int bitsPerElement()
PatriciaTrie.KeyAnalyzer
bitsPerElement
in interface PatriciaTrie.KeyAnalyzer<List<String>>
public boolean isBitSet(List<String> key, int keyLength, int bitIndex)
PatriciaTrie.KeyAnalyzer
isBitSet
in interface PatriciaTrie.KeyAnalyzer<List<String>>
public boolean isPrefix(List<String> prefix, int offset, int length, List<String> key)
PatriciaTrie.KeyAnalyzer
isPrefix
in interface PatriciaTrie.KeyAnalyzer<List<String>>
true
if prefix
matches the given
offset
start and length
for key
.public int length(List<String> key)
PatriciaTrie.KeyAnalyzer
length
in interface PatriciaTrie.KeyAnalyzer<List<String>>
key
- Key whose length should be computed.key
.