|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmondrian.rolap.BitKey.AbstractBitKey
public abstract static class BitKey.AbstractBitKey
Abstract implementation of BitKey
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface mondrian.rolap.BitKey |
---|
BitKey.AbstractBitKey, BitKey.Big, BitKey.Factory, BitKey.Mid128, BitKey.Small |
Field Summary | |
---|---|
protected static int |
ChunkBitCount
|
protected static int |
Mask
|
Fields inherited from interface mondrian.rolap.BitKey |
---|
bitPositionTable |
Constructor Summary | |
---|---|
protected |
BitKey.AbstractBitKey()
Creates an AbstractBitKey. |
Method Summary | |
---|---|
protected static long |
bit(int pos)
Creates a chunk containing a single bit. |
protected static int |
bitCount(long i)
Returns the number of one-bits in the two's complement binary representation of the specified long value. |
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. |
(package private) static int |
compareUnsigned(long i1,
long i2)
Performs unsigned comparison on two long values. |
(package private) static int |
compareUnsignedArrays(long[] a1,
long[] a2)
Compares a pair of long arrays, using unsigned comparison
semantics and padding to the left with 0s. |
protected static void |
copyFromByte(java.util.BitSet bitSet,
int pos,
byte x)
Copies a byte into a bit set at a particular position. |
protected static void |
copyFromLong(java.util.BitSet bitSet,
int pos,
long x)
Copies a long value (interpreted as 64 bits) into a bit set. |
protected java.lang.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, cardinality, clear, clear, copy, emptyCopy, get, intersects, isEmpty, isSuperSetOf, iterator, or, set, toBitSet |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Field Detail |
---|
protected static final int ChunkBitCount
protected static final int Mask
Constructor Detail |
---|
protected BitKey.AbstractBitKey()
Method Detail |
---|
protected static long bit(int pos)
protected static int chunkPos(int size)
protected static int chunkCount(int size)
0 bits requires 0 chunks; 1 - 64 bits requires 1 chunk; etc.
protected static int bitCount(long i)
(Copied from Long.bitCount(long)
, which was
introduced in JDK 1.5, but we need the functionality in JDK 1.4.)
public final void set(int pos, boolean value)
BitKey
set
in interface BitKey
protected static void copyFromByte(java.util.BitSet bitSet, int pos, byte x)
bitSet
- Bit setpos
- Positionx
- Byteprotected static void copyFromLong(java.util.BitSet bitSet, int pos, long x)
long
value (interpreted as 64 bits) into a bit set.
bitSet
- Bit setpos
- Positionx
- Byteprotected java.lang.IllegalArgumentException createException(BitKey bitKey)
static int compareUnsignedArrays(long[] a1, long[] a2)
long
arrays, using unsigned comparison
semantics and padding to the left with 0s.
Values are treated as unsigned for the purposes of comparison.
If the arrays have different lengths, the shorter is padded with 0s.
a1
- First arraya2
- Second array
static int compareUnsigned(long i1, long i2)
long
values.
i1
- First valuei2
- Second value
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |