org.antlr.runtime.BitSet Class Reference

List of all members.

Public Member Functions

 BitSet ()
 BitSet (long[] bits_)
 BitSet (List items)
 BitSet (int nbits)
BitSet or (BitSet a)
void add (int el)
void growToInclude (int bit)
void orInPlace (BitSet a)
Object clone ()
int size ()
boolean equals (Object other)
boolean member (int el)
void remove (int el)
boolean isNil ()
int numBits ()
int lengthInLongWords ()
int[] toArray ()
long[] toPackedArray ()
String toString ()
String toString (String[] tokenNames)

Static Public Member Functions

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)

Protected Attributes

long bits []

Static Protected Attributes

static final int BITS = 64
static final int LOG_BITS = 6
static final int MOD_MASK = BITS - 1

Private Member Functions

void setSize (int nwords)
final int numWordsToHold (int el)

Static Private Member Functions

static final long bitMask (int bitNumber)
static final int wordNumber (int bit)


Detailed Description

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.

Definition at line 36 of file BitSet.java.


Constructor & Destructor Documentation

org.antlr.runtime.BitSet.BitSet (  ) 

Construct a bitset of size one word (64 bits)

Definition at line 51 of file BitSet.java.

org.antlr.runtime.BitSet.BitSet ( long[]  bits_  ) 

Construction from a static array of longs

Definition at line 56 of file BitSet.java.

org.antlr.runtime.BitSet.BitSet ( List  items  ) 

Construction from a list of integers

Definition at line 61 of file BitSet.java.

org.antlr.runtime.BitSet.BitSet ( int  nbits  ) 

Construct a bitset given the size

Parameters:
nbits The size of the bitset in bits

Definition at line 72 of file BitSet.java.


Member Function Documentation

static BitSet org.antlr.runtime.BitSet.of ( int  el  )  [static]

Definition at line 76 of file BitSet.java.

static BitSet org.antlr.runtime.BitSet.of ( int  a,
int  b 
) [static]

Definition at line 82 of file BitSet.java.

static BitSet org.antlr.runtime.BitSet.of ( int  a,
int  b,
int  c 
) [static]

Definition at line 89 of file BitSet.java.

static BitSet org.antlr.runtime.BitSet.of ( int  a,
int  b,
int  c,
int  d 
) [static]

Definition at line 97 of file BitSet.java.

BitSet org.antlr.runtime.BitSet.or ( BitSet  a  ) 

return this | a in a new set

Definition at line 107 of file BitSet.java.

void org.antlr.runtime.BitSet.add ( int  el  ) 

or this element into this set (grow as necessary to accommodate)

Definition at line 117 of file BitSet.java.

void org.antlr.runtime.BitSet.growToInclude ( int  bit  ) 

Grows the set to a larger number of bits.

Parameters:
bit element that must fit in set

Definition at line 129 of file BitSet.java.

void org.antlr.runtime.BitSet.orInPlace ( BitSet  a  ) 

Definition at line 136 of file BitSet.java.

void org.antlr.runtime.BitSet.setSize ( int  nwords  )  [private]

Sets the size of a set.

Parameters:
nwords how many words the new set should be

Definition at line 154 of file BitSet.java.

static final long org.antlr.runtime.BitSet.bitMask ( int  bitNumber  )  [static, private]

Definition at line 161 of file BitSet.java.

Object org.antlr.runtime.BitSet.clone (  ) 

Definition at line 166 of file BitSet.java.

int org.antlr.runtime.BitSet.size (  ) 

Definition at line 179 of file BitSet.java.

boolean org.antlr.runtime.BitSet.equals ( Object  other  ) 

Definition at line 194 of file BitSet.java.

boolean org.antlr.runtime.BitSet.member ( int  el  ) 

Definition at line 230 of file BitSet.java.

void org.antlr.runtime.BitSet.remove ( int  el  ) 

Definition at line 240 of file BitSet.java.

boolean org.antlr.runtime.BitSet.isNil (  ) 

Definition at line 247 of file BitSet.java.

final int org.antlr.runtime.BitSet.numWordsToHold ( int  el  )  [private]

Definition at line 254 of file BitSet.java.

int org.antlr.runtime.BitSet.numBits (  ) 

Definition at line 258 of file BitSet.java.

int org.antlr.runtime.BitSet.lengthInLongWords (  ) 

return how much space is being used by the bits array not how many actually have member bits on.

Definition at line 265 of file BitSet.java.

int [] org.antlr.runtime.BitSet.toArray (  ) 

Is this contained within a?

Definition at line 277 of file BitSet.java.

long [] org.antlr.runtime.BitSet.toPackedArray (  ) 

Definition at line 288 of file BitSet.java.

static final int org.antlr.runtime.BitSet.wordNumber ( int  bit  )  [static, private]

Definition at line 292 of file BitSet.java.

String org.antlr.runtime.BitSet.toString (  ) 

Definition at line 296 of file BitSet.java.

String org.antlr.runtime.BitSet.toString ( String[]  tokenNames  ) 

Definition at line 300 of file BitSet.java.


Member Data Documentation

final int org.antlr.runtime.BitSet.BITS = 64 [static, protected]

Definition at line 37 of file BitSet.java.

final int org.antlr.runtime.BitSet.LOG_BITS = 6 [static, protected]

Definition at line 38 of file BitSet.java.

final int org.antlr.runtime.BitSet.MOD_MASK = BITS - 1 [static, protected]

Definition at line 45 of file BitSet.java.

long org.antlr.runtime.BitSet.bits[] [protected]

The actual data bits

Definition at line 48 of file BitSet.java.


The documentation for this class was generated from the following file:

Generated on Wed Oct 1 14:13:39 2008 for ANTLR API by  doxygen 1.5.5