mondrian.rolap
Class BitKey.AbstractBitKey
java.lang.Object
mondrian.rolap.BitKey.AbstractBitKey
- All Implemented Interfaces:
- Comparable<BitKey>, Iterable<Integer>, BitKey
- Direct Known Subclasses:
- BitKey.Big, BitKey.Mid128, BitKey.Small
- Enclosing interface:
- BitKey
public abstract static class BitKey.AbstractBitKey
- extends Object
- implements BitKey
Abstract implementation of BitKey
.
-
-
Method Summary |
protected static long |
bit(int pos)
Creates a chunk containing a single bit. |
protected static int |
chunkCount(int size)
Returns the number of chunks required for a given number of bits. |
protected static int |
chunkPos(int size)
Returns which chunk a given bit falls into. |
protected static void |
copyFromByte(BitSet bitSet,
int pos,
byte x)
|
protected static void |
copyFromLong(BitSet bitSet,
int pos,
long x)
|
protected IllegalArgumentException |
createException(BitKey bitKey)
|
void |
set(int pos,
boolean value)
Sets the bit at the specified index to the specified value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface mondrian.rolap.BitKey |
and, andNot, clear, clear, copy, emptyCopy, get, intersects, isEmpty, isSuperSetOf, iterator, or, set, toBitSet |
ChunkBitCount
protected static final int ChunkBitCount
- See Also:
- Constant Field Values
Mask
protected static final int Mask
- See Also:
- Constant Field Values
BitKey.AbstractBitKey
protected BitKey.AbstractBitKey()
bit
protected static long bit(int pos)
- Creates a chunk containing a single bit.
chunkPos
protected static int chunkPos(int size)
- Returns which chunk a given bit falls into.
Bits 0 to 63 fall in chunk 0, bits 64 to 127 fall into chunk 1.
chunkCount
protected static int chunkCount(int size)
- Returns the number of chunks required for a given number of bits.
0 bits requires 0 chunks; 1 - 64 bits requires 1 chunk; etc.
set
public final void set(int pos,
boolean value)
- Description copied from interface:
BitKey
- Sets the bit at the specified index to the specified value.
- Specified by:
set
in interface BitKey
copyFromByte
protected static void copyFromByte(BitSet bitSet,
int pos,
byte x)
copyFromLong
protected static void copyFromLong(BitSet bitSet,
int pos,
long x)
createException
protected IllegalArgumentException createException(BitKey bitKey)