Package tripleplay.util
Class BitVec
java.lang.Object
tripleplay.util.BitVec
A bit vector. We'd use Java's
BitSet
, but GWT doesn't support it. Note that we also use
int
instead of long
to be GWT/JavaScript-friendly. TODO: maybe use super-source
to use longs by default but int for GWT?-
Constructor Summary
-
Method Summary
-
Constructor Details
-
BitVec
public BitVec()Creates a bit vector with an initial capacity of 16 words. -
BitVec
public BitVec(int words) Creates a bit vector with the specified initial capacity (in words).
-
-
Method Details
-
isSet
public boolean isSet(int value) Returns whether thevalue
th bit it set. -
set
public void set(int value) Sets thevalue
th bit. -
set
Copies the contents ofother
to this bit vector. -
clear
public void clear(int value) Clears thevalue
th bit. -
clear
public void clear()Clears all bits in this vector. -
toString
-