Logo Search packages:      
Sourcecode: antlr version File versions

antlr::collections::impl::BitSet Class Reference

List of all members.

Detailed Description

A BitSet to replace java.util.BitSet. Primary differences are that most set operators return new sets as opposed to oring and anding "in place". Further, a number of operations were added. I cannot contain a BitSet because there is no way to access the internal bits (which I need for speed) and, because it is final, I cannot subclass to add functionality. Consider defining set degree. Without access to the bits, I must call a method n times to test the ith bit...ack!

Also seems like or() from util is wrong when size of incoming set is bigger than this.bits.length.

Terence Parr

Pete Wells

Definition at line 27 of file BitSet.java.

Public Member Functions

virtual void add (int el)
void add (int el)
virtual BitSet and (BitSet a)
BitSet and (BitSet a)
virtual void andInPlace (BitSet a)
void andInPlace (BitSet a)
 BitSet (int nbits)
 BitSet (long[] bits_)
 BitSet (int nbits)
 BitSet (long[] bits_)
 BitSet ()
virtual void clear (int el)
virtual void clear ()
void clear (int el)
void clear ()
virtual object Clone ()
Object clone ()
virtual int degree ()
int degree ()
override bool Equals (object obj)
boolean equals (Object obj)
override int GetHashCode ()
virtual void growToInclude (int bit)
void growToInclude (int bit)
virtual int lengthInLongWords ()
int lengthInLongWords ()
virtual bool member (int el)
boolean member (int el)
virtual bool nil ()
boolean nil ()
virtual BitSet not ()
BitSet not ()
virtual void notInPlace (int minBit, int maxBit)
virtual void notInPlace (int maxBit)
virtual void notInPlace ()
void notInPlace (int minBit, int maxBit)
void notInPlace (int maxBit)
void notInPlace ()
virtual BitSet or (BitSet a)
BitSet or (BitSet a)
virtual void orInPlace (BitSet a)
void orInPlace (BitSet a)
virtual void remove (int el)
void remove (int el)
virtual int size ()
int size ()
virtual bool subset (BitSet a)
boolean subset (BitSet a)
virtual void subtractInPlace (BitSet a)
void subtractInPlace (BitSet a)
virtual int[] toArray ()
int[] toArray ()
virtual long[] toPackedArray ()
long[] toPackedArray ()
virtual string ToString (string separator, ArrayList vocabulary)
virtual string ToString (string separator)
override string ToString ()
String toString (String separator, Vector vocabulary)
String toString (String separator, CharFormatter formatter)
String toString (String separator)
String toString ()
virtual string toStringOfHalfWords ()
String toStringOfHalfWords ()
virtual string toStringOfWords ()
String toStringOfWords ()
String toStringWithRanges (String separator, CharFormatter formatter)

Static Public Member Functions

static Vector getRanges (int[] elems)
static BitSet of (int el)
static BitSet of (int el)

Protected Attributes

internal const int BITS = 64
long bits []
internal long[] dataBits
internal const int LOG_BITS = 6
internal const int NIBBLE = 4

Static Protected Attributes

static final int BITS = 64
static final int LOG_BITS = 6
static internal readonly int MOD_MASK = BITS - 1
static final int MOD_MASK = BITS - 1
static final int NIBBLE = 4

Private Member Functions

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

Static Private Member Functions

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

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

Generated by  Doxygen 1.6.0   Back to index