|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.BitSet edu.northwestern.at.utils.XBitSet
public class XBitSet
An enhanced bitset.
Field Summary | |
---|---|
static XBitSet |
EMPTY_SET
The empty set. |
Constructor Summary | |
---|---|
XBitSet()
Constructs a new empty bitset. |
|
XBitSet(int nbits)
Constructs a new empty bitset with enough room for nbits bits. |
|
XBitSet(int[] bits)
Constructs a new bitset from an array. |
|
XBitSet(int nbits,
int[] bits)
Constructs a new bitset with enough room for nbits bits from an array. |
Method Summary | |
---|---|
int |
count()
Gets the number of elements in the bitset. |
IntIterator |
iterator()
Gets an iterator over the bitset. |
XBitSet |
or(XBitSet bitSet)
Or another XBitSet with this one. |
void |
set(int bitIndex,
boolean value)
Sets the bit at a specificed index to a specified value. |
Methods inherited from class java.util.BitSet |
---|
and, andNot, cardinality, clear, clear, clear, clone, equals, flip, flip, get, get, hashCode, intersects, isEmpty, length, nextClearBit, nextSetBit, or, set, set, set, size, toString, xor |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final XBitSet EMPTY_SET
Constructor Detail |
---|
public XBitSet()
public XBitSet(int nbits)
nbits
- The initial size of the bitset. public XBitSet(int[] bits)
bits
- An array of the initial bits to set. public XBitSet(int nbits, int[] bits)
nbits
- The initial size of the bitset.bits
- An array of the initial bits to set. Method Detail |
---|
public int count()
public IntIterator iterator()
The behavior of the iterator is unspecified if the underlying bitset is modified while the iteration is in progress.
public XBitSet or(XBitSet bitSet)
public void set(int bitIndex, boolean value)
set
in class java.util.BitSet
bitIndex
- Bit index.value
- The boolean value to set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |