public class StringKeyAnalyzer extends AbstractKeyAnalyzer<java.lang.String>
KeyAnalyzer for Strings| Modifier and Type | Field and Description |
|---|---|
static StringKeyAnalyzer |
INSTANCE
A singleton instance of
StringKeyAnalyzer |
static int |
LENGTH
The number of bits per
Character |
EQUAL_BIT_KEY, NULL_BIT_KEY, OUT_OF_BOUNDS_BIT_KEY| Constructor and Description |
|---|
StringKeyAnalyzer() |
| Modifier and Type | Method and Description |
|---|---|
int |
bitIndex(java.lang.String key,
int offsetInBits,
int lengthInBits,
java.lang.String other,
int otherOffsetInBits,
int otherLengthInBits)
Returns the n-th different bit between key and found.
|
int |
bitsPerElement()
Returns the number of bits per element in the key.
|
boolean |
isBitSet(java.lang.String key,
int bitIndex,
int lengthInBits)
Returns whether or not a bit is set
|
boolean |
isPrefix(java.lang.String prefix,
int offsetInBits,
int lengthInBits,
java.lang.String key)
Determines whether or not the given prefix (from offset to length)
is a prefix of the given key.
|
int |
lengthInBits(java.lang.String key)
Returns the length of the Key in bits.
|
comparepublic static final StringKeyAnalyzer INSTANCE
StringKeyAnalyzerpublic static final int LENGTH
Characterpublic int bitsPerElement()
public int lengthInBits(java.lang.String key)
public int bitIndex(java.lang.String key,
int offsetInBits,
int lengthInBits,
java.lang.String other,
int otherOffsetInBits,
int otherLengthInBits)
public boolean isBitSet(java.lang.String key,
int bitIndex,
int lengthInBits)
public boolean isPrefix(java.lang.String prefix,
int offsetInBits,
int lengthInBits,
java.lang.String key)
Copyright © 2005-2009 Roger Kapsi, Sam Berlin. All Rights Reserved.