| |
|
| java.lang.Object org.apache.derby.iapi.util.JBitSet
JBitSet | final public class JBitSet (Code) | | 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.
author: Jerry Brenner |
Constructor Summary | |
public | JBitSet(int size) Construct a JBitSet of the specified size. |
JBitSet | public JBitSet(int size)(Code) | | Construct a JBitSet of the specified size.
Parameters: size - The number of bits in the JBitSet. |
clear | public void clear(int bitIndex)(Code) | | |
clearAll | public void clearAll()(Code) | | Clear all of the bits in this JBitSet
|
contains | public boolean contains(JBitSet jBitSet)(Code) | | Test to see if one JBitSet contains another one of
the same size.
Parameters: jBitSet - JBitSet that we want to know if it isa subset of current JBitSet boolean Whether or not jBitSet is a subset. |
get | public boolean get(int bitIndex)(Code) | | |
getFirstSetBit | public int getFirstSetBit()(Code) | | Get the first set bit (starting at index 0) from a JBitSet.
int Index of first set bit, -1 if none set. |
grow | public void grow(int newSize)(Code) | | Grow an existing JBitSet to the specified size.
Parameters: newSize - The new size |
hasSingleBitSet | public boolean hasSingleBitSet()(Code) | | See of a JBitSet has exactly 1 bit set.
boolean Whether or not JBitSet has a single bit set. |
hashCode | public int hashCode()(Code) | | |
set | public void set(int bitIndex)(Code) | | |
setTo | public void setTo(JBitSet sourceBitSet)(Code) | | Set the BitSet to have the exact same bits set as the parameter's BitSet.
Parameters: sourceBitSet - The JBitSet to copy. |
size | public int size()(Code) | | Return the size of bitSet
int Size of bitSet |
|
|
|