public class ShortKeyAnalyzer extends java.lang.Object implements KeyAnalyzer<java.lang.Short>
KeyAnalyzer for Shorts| Modifier and Type | Field and Description |
|---|---|
static ShortKeyAnalyzer |
INSTANCE
A singleton instance of
ShortKeyAnalyzer |
static int |
LENGTH
The length of an
Short in bits |
EQUAL_BIT_KEY, NULL_BIT_KEY, OUT_OF_BOUNDS_BIT_KEY| Constructor and Description |
|---|
ShortKeyAnalyzer() |
| Modifier and Type | Method and Description |
|---|---|
int |
bitIndex(java.lang.Short key,
int offsetInBits,
int lengthInBits,
java.lang.Short 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.
|
int |
compare(java.lang.Short o1,
java.lang.Short o2) |
boolean |
isBitSet(java.lang.Short key,
int bitIndex,
int lengthInBits)
Returns whether or not a bit is set
|
boolean |
isPrefix(java.lang.Short prefix,
int offsetInBits,
int lengthInBits,
java.lang.Short key)
Determines whether or not the given prefix (from offset to length)
is a prefix of the given key.
|
int |
lengthInBits(java.lang.Short key)
Returns the length of the Key in bits.
|
public static final ShortKeyAnalyzer INSTANCE
ShortKeyAnalyzerpublic static final int LENGTH
Short in bitspublic int bitsPerElement()
bitsPerElement in interface KeyAnalyzer<java.lang.Short>public int lengthInBits(java.lang.Short key)
lengthInBits in interface KeyAnalyzer<java.lang.Short>public boolean isBitSet(java.lang.Short key,
int bitIndex,
int lengthInBits)
isBitSet in interface KeyAnalyzer<java.lang.Short>public int bitIndex(java.lang.Short key,
int offsetInBits,
int lengthInBits,
java.lang.Short other,
int otherOffsetInBits,
int otherLengthInBits)
bitIndex in interface KeyAnalyzer<java.lang.Short>public int compare(java.lang.Short o1,
java.lang.Short o2)
compare in interface java.util.Comparator<java.lang.Short>public boolean isPrefix(java.lang.Short prefix,
int offsetInBits,
int lengthInBits,
java.lang.Short key)
isPrefix in interface KeyAnalyzer<java.lang.Short>Copyright © 2005-2009 Roger Kapsi, Sam Berlin. All Rights Reserved.