public class BitSet32 extends java.lang.Object implements BitSetInterface
Modifier and Type | Field and Description |
---|---|
private int[] |
bits |
private int |
numBits |
private int |
wordSize |
private int |
wordsLength |
Constructor and Description |
---|
BitSet32(int bitsSize)
Constructs an OpenBitSet large enough to hold numBits.
|
Modifier and Type | Method and Description |
---|---|
int |
bitSize()
Returns the size in term of bits
|
void |
clear(int index)
Clears a bit.
|
boolean |
get(int index) |
int |
getBit(int index)
Returns 1 if the bit is set, 0 if not.
|
void |
set(int index) |
int |
size()
Returns the size of the bitset (number of words)
|
java.lang.String |
toString() |
private int[] bits
private int numBits
private int wordsLength
private int wordSize
public BitSet32(int bitsSize)
numBits
- public int size()
size
in interface BitSetInterface
public int bitSize()
bitSize
in interface BitSetInterface
public boolean get(int index)
get
in interface BitSetInterface
public int getBit(int index)
getBit
in interface BitSetInterface
public void set(int index)
set
in interface BitSetInterface
public void clear(int index)
clear
in interface BitSetInterface
public java.lang.String toString()
toString
in class java.lang.Object