Class BitSet
java.lang.Object
org.antlr.runtime.BitSet
- All Implemented Interfaces:
Cloneable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int el) or this element into this set (grow as necessary to accommodate)clone()booleanvoidgrowToInclude(int bit) Grows the set to a larger number of bits.booleanisNil()intreturn how much space is being used by the bits array not how many actually have member bits on.booleanmember(int el) intnumBits()static BitSetof(int el) static BitSetof(int a, int b) static BitSetof(int a, int b, int c) static BitSetof(int a, int b, int c, int d) return this | a in a new setvoidvoidremove(int el) intsize()int[]toArray()Is this contained within a?long[]toString()
-
Field Details
-
BITS
protected static final int BITS- See Also:
-
LOG_BITS
protected static final int LOG_BITS- See Also:
-
MOD_MASK
protected static final int MOD_MASK- See Also:
-
bits
protected long[] bitsThe actual data bits
-
-
Constructor Details
-
BitSet
public BitSet()Construct a bitset of size one word (64 bits) -
BitSet
public BitSet(long[] bits_) Construction from a static array of longs -
BitSet
-
BitSet
public BitSet(int nbits) Construct a bitset given the size- Parameters:
nbits- The size of the bitset in bits
-
-
Method Details
-
of
-
of
-
of
-
of
-
or
-
add
public void add(int el) or this element into this set (grow as necessary to accommodate) -
growToInclude
public void growToInclude(int bit) Grows the set to a larger number of bits.- Parameters:
bit- element that must fit in set
-
orInPlace
-
clone
-
size
public int size() -
equals
-
member
public boolean member(int el) -
remove
public void remove(int el) -
isNil
public boolean isNil() -
numBits
public int numBits() -
lengthInLongWords
public int lengthInLongWords()return how much space is being used by the bits array not how many actually have member bits on. -
toArray
public int[] toArray()Is this contained within a? -
toPackedArray
public long[] toPackedArray() -
toString
-
toString
-