public abstract class BitVectorBase<T extends BitVectorBase> extends Object implements Cloneable, Serializable
Modifier and Type | Field and Description |
---|---|
protected int[] |
bits |
protected static int |
BITS_PER_UNIT |
protected static boolean |
DEBUG |
protected static int |
LOG_BITS_PER_UNIT |
protected static int |
LOW_MASK |
protected static int |
MASK |
Constructor and Description |
---|
BitVectorBase() |
Modifier and Type | Method and Description |
---|---|
abstract void |
and(T other) |
abstract void |
andNot(T other) |
abstract void |
clear(int bit) |
void |
clearAll()
Clears all bits.
|
Object |
clone() |
boolean |
contains(int i) |
void |
copyBits(BitVectorBase set)
Copies the values of the bits in the specified set into this set.
|
abstract boolean |
get(int bit) |
int |
hashCode() |
abstract boolean |
intersectionEmpty(T other) |
abstract boolean |
isSubset(T other) |
boolean |
isZero() |
abstract int |
length() |
int |
max() |
int |
nextSetBit(int start) |
abstract void |
or(T other) |
int |
populationCount()
How many bits are set?
|
abstract boolean |
sameBits(T other) |
abstract void |
set(int bit) |
static int |
subscript(int bitIndex)
Convert bitIndex to a subscript into the bits[] array.
|
String |
toString() |
abstract void |
xor(T other) |
protected static final boolean DEBUG
protected static final int LOG_BITS_PER_UNIT
protected static final int BITS_PER_UNIT
protected static final int MASK
protected static final int LOW_MASK
protected int[] bits
public abstract void set(int bit)
public abstract void clear(int bit)
public abstract boolean get(int bit)
public abstract int length()
public abstract void and(T other)
public abstract void andNot(T other)
public abstract void or(T other)
public abstract void xor(T other)
public abstract boolean sameBits(T other)
public abstract boolean isSubset(T other)
public abstract boolean intersectionEmpty(T other)
public static int subscript(int bitIndex)
public final void clearAll()
public final int populationCount()
public boolean isZero()
public boolean contains(int i)
public int max()
public int nextSetBit(int start)
public void copyBits(BitVectorBase set)
set
- the bit set to copy the bits fromIllegalArgumentException
- if set is null