Package org.antlr.runtime
Class BitSet
- java.lang.Object
-
- org.antlr.runtime.BitSet
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int el)
or this element into this set (grow as necessary to accommodate)Object
clone()
boolean
equals(Object other)
void
growToInclude(int bit)
Grows the set to a larger number of bits.boolean
isNil()
int
lengthInLongWords()
return how much space is being used by the bits array not how many actually have member bits on.boolean
member(int el)
int
numBits()
static BitSet
of(int el)
static BitSet
of(int a, int b)
static BitSet
of(int a, int b, int c)
static BitSet
of(int a, int b, int c, int d)
BitSet
or(BitSet a)
return this | a in a new setvoid
orInPlace(BitSet a)
void
remove(int el)
int
size()
int[]
toArray()
Is this contained within a?long[]
toPackedArray()
String
toString()
String
toString(String[] tokenNames)
-
-
-
Field Detail
-
BITS
protected static final int BITS
- See Also:
- Constant Field Values
-
LOG_BITS
protected static final int LOG_BITS
- See Also:
- Constant Field Values
-
MOD_MASK
protected static final int MOD_MASK
- See Also:
- Constant Field Values
-
bits
protected long[] bits
The actual data bits
-
-
Method Detail
-
of
public static BitSet of(int el)
-
of
public static BitSet of(int a, int b)
-
of
public static BitSet of(int a, int b, int c)
-
of
public static BitSet of(int a, int b, int c, int d)
-
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
public void orInPlace(BitSet a)
-
size
public int size()
-
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()
-
-