public class BitSet64 extends java.lang.Object implements BitSetInterface
Constructor and Description |
---|
BitSet64(int numBits)
Constructs an OpenBitSet large enough to hold numBits.
|
Modifier and Type | Method and Description |
---|---|
static int |
bits2words(int numBits)
returns the number of 64 bit words it would take to hold numBits
|
int |
bitSize()
Returns the size of the bitset (number of words)
|
void |
clear(int index)
Clears a bit.
|
boolean |
get(int index)
Returns true or false for the specified bit index.
|
int |
getBit(int index)
Returns 1 if the bit is set, 0 if not.
|
long[] |
getBits()
Expert: returns the long[] storing the bits
|
void |
set(int index)
Sets the bit at the specified index.
|
int |
size()
Returns the size of the bitset (number of words)
|
java.lang.String |
toString() |
public BitSet64(int numBits)
numBits
- public int size()
size
in interface BitSetInterface
public int bitSize()
bitSize
in interface BitSetInterface
public long[] getBits()
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 static int bits2words(int numBits)
public java.lang.String toString()
toString
in class java.lang.Object