|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.iapi.util.JBitSet
JBitSet is a wrapper class for BitSet. It is a fixed length implementation which can be extended via the grow() method. It provides additional methods to manipulate BitSets. NOTE: JBitSet was driven by the (current and perceived) needs of the optimizer, but placed in the util package since it is not specific to query trees.. NOTE: java.util.BitSet is final, so we must provide a wrapper class which includes a BitSet member in order to extend the functionality. We want to make it look like JBitSet extends BitSet, so we need to provide wrapper methods for all of BitSet's methods.
Field Summary | |
private java.util.BitSet |
bitSet
|
private int |
size
|
Constructor Summary | |
private |
JBitSet(java.util.BitSet bitSet,
int size)
Construct a JBitSet with the specified bitSet. |
|
JBitSet(int size)
Construct a JBitSet of the specified size. |
Method Summary | |
void |
and(JBitSet set)
|
void |
clear(int bitIndex)
|
void |
clearAll()
Clear all of the bits in this JBitSet |
java.lang.Object |
clone()
|
boolean |
contains(JBitSet jBitSet)
Test to see if one JBitSet contains another one of the same size. |
boolean |
equals(java.lang.Object obj)
|
boolean |
get(int bitIndex)
|
int |
getFirstSetBit()
Get the first set bit (starting at index 0) from a JBitSet. |
void |
grow(int newSize)
Grow an existing JBitSet to the specified size. |
int |
hashCode()
|
boolean |
hasSingleBitSet()
See of a JBitSet has exactly 1 bit set. |
void |
or(JBitSet set)
|
void |
set(int bitIndex)
|
void |
setTo(JBitSet sourceBitSet)
Set the BitSet to have the exact same bits set as the parameter's BitSet. |
int |
size()
Return the size of bitSet |
java.lang.String |
toString()
|
void |
xor(JBitSet set)
|
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private final java.util.BitSet bitSet
private int size
Constructor Detail |
public JBitSet(int size)
size
- The number of bits in the JBitSet.private JBitSet(java.util.BitSet bitSet, int size)
bitSet
- The BitSet.size
- The size of bitSet.
NOTE: We need to specify the size since the size of a
BitSet is not guaranteed to be the same as JBitSet.size().Method Detail |
public void setTo(JBitSet sourceBitSet)
sourceBitSet
- The JBitSet to copy.
public boolean contains(JBitSet jBitSet)
jBitSet
- JBitSet that we want to know if it is
a subset of current JBitSet
public boolean hasSingleBitSet()
public int getFirstSetBit()
public void grow(int newSize)
newSize
- The new sizepublic void clearAll()
public java.lang.String toString()
public boolean equals(java.lang.Object obj)
public int hashCode()
public java.lang.Object clone()
public boolean get(int bitIndex)
public void set(int bitIndex)
public void clear(int bitIndex)
public void and(JBitSet set)
public void or(JBitSet set)
public void xor(JBitSet set)
public int size()
|
Built on Tue 2006-10-10 19:23:47+0200, from revision exported | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |