|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.antlr.runtime.BitSet
public class BitSet
A stripped-down version of org.antlr.misc.BitSet that is just good enough to handle runtime requirements such as FOLLOW sets for automatic error recovery.
Field Summary | |
---|---|
protected long[] |
bits
The actual data bits |
protected static int |
BITS
|
protected static int |
LOG_BITS
|
protected static int |
MOD_MASK
|
Constructor Summary | |
---|---|
BitSet()
Construct a bitset of size one word (64 bits) |
|
BitSet(int nbits)
Construct a bitset given the size |
|
BitSet(java.util.List items)
Construction from a list of integers |
|
BitSet(long[] bits_)
Construction from a static array of longs |
Method Summary | |
---|---|
void |
add(int el)
or this element into this set (grow as necessary to accommodate) |
java.lang.Object |
clone()
|
boolean |
equals(java.lang.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 set |
void |
orInPlace(BitSet a)
|
void |
remove(int el)
|
int |
size()
|
int[] |
toArray()
Is this contained within a? |
long[] |
toPackedArray()
|
java.lang.String |
toString()
|
java.lang.String |
toString(java.lang.String[] tokenNames)
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final int BITS
protected static final int LOG_BITS
protected static final int MOD_MASK
protected long[] bits
Constructor Detail |
---|
public BitSet()
public BitSet(long[] bits_)
public BitSet(java.util.List items)
public BitSet(int nbits)
nbits
- The size of the bitset in bitsMethod Detail |
---|
public static BitSet of(int el)
public static BitSet of(int a, int b)
public static BitSet of(int a, int b, int c)
public static BitSet of(int a, int b, int c, int d)
public BitSet or(BitSet a)
public void add(int el)
public void growToInclude(int bit)
bit
- element that must fit in setpublic void orInPlace(BitSet a)
public java.lang.Object clone()
clone
in class java.lang.Object
public int size()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public boolean member(int el)
public void remove(int el)
public boolean isNil()
public int numBits()
public int lengthInLongWords()
public int[] toArray()
public long[] toPackedArray()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(java.lang.String[] tokenNames)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |