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