|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--antlr.collections.impl.BitSet
Untamed:
Field Summary | |
protected long[] |
bits
The actual data bits |
protected static int |
BITS
|
protected static int |
LOG_BITS
|
protected static int |
MOD_MASK
|
protected static int |
NIBBLE
|
Constructor Summary | |
BitSet()
Enabled: Construct a bitset of size one word (64 bits) |
|
BitSet(int nbits)
Enabled: Construct a bitset given the size |
|
BitSet(long[] bits_)
Enabled: Construction from a static array of longs |
Method Summary | |
void |
add(int el)
Enabled: or this element into this set (grow as necessary to accommodate) |
BitSet |
and(BitSet a)
Enabled: |
void |
andInPlace(BitSet a)
Enabled: |
private static long |
bitMask(int bitNumber)
|
void |
clear()
Enabled: |
void |
clear(int el)
Enabled: |
Object |
clone()
Suppressed: |
int |
degree()
Enabled: |
boolean |
equals(Object obj)
Suppressed: code "inherited" from java.util.BitSet |
static Vector |
getRanges(int[] elems)
Enabled: Find ranges in a set element array. |
void |
growToInclude(int bit)
Enabled: Grows the set to a larger number of bits. |
boolean |
member(int el)
Enabled: |
boolean |
nil()
Enabled: |
BitSet |
not()
Enabled: |
void |
notInPlace()
Enabled: |
void |
notInPlace(int maxBit)
Enabled: complement bits in the range 0..maxBit. |
void |
notInPlace(int minBit,
int maxBit)
Enabled: complement bits in the range minBit..maxBit. |
private int |
numWordsToHold(int el)
|
static BitSet |
of(int el)
Enabled: |
BitSet |
or(BitSet a)
Enabled: return this | a in a new set |
void |
orInPlace(BitSet a)
Enabled: |
void |
remove(int el)
Enabled: |
private void |
setSize(int nwords)
Sets the size of a set. |
int |
size()
Enabled: |
boolean |
subset(BitSet a)
Enabled: Is this contained within a? |
void |
subtractInPlace(BitSet a)
Enabled: Subtract the elements of 'a' from 'this' in-place. |
int[] |
toArray()
Enabled: |
String |
toString()
Suppressed: |
String |
toString(String separator)
Enabled: Transform a bit set into a string by formatting each element as an integer |
String |
toString(String separator,
CharFormatter formatter)
Enabled: Transform a bit set into a string of characters. |
String |
toString(String separator,
Vector vocabulary)
Enabled: Create a string representation where instead of integer elements, the ith element of vocabulary is displayed instead. |
String |
toStringOfHalfWords()
Enabled: Dump a comma-separated list of the words making up the bit set. |
String |
toStringOfWords()
Enabled: Dump a comma-separated list of the words making up the bit set. |
String |
toStringWithRanges(String separator,
CharFormatter formatter)
Enabled: Print out the bit set but collapse char ranges. |
private static int |
wordNumber(int bit)
|
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 NIBBLE
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(int nbits)
nbits
- The size of the bitset in bitsMethod Detail |
public void add(int el)
public BitSet and(BitSet a)
public void andInPlace(BitSet a)
private static final long bitMask(int bitNumber)
public void clear()
public void clear(int el)
public Object clone()
clone
in class Object
java.lang.Cloneable
public int degree()
public boolean equals(Object obj)
equals
in class Object
obj
- the reference object with which to compare.
true
if this object is the same as the obj
argument; false
otherwise.Object.hashCode()
,
java.util.Hashtable
public static Vector getRanges(int[] elems)
public void growToInclude(int bit)
bit
- element that must fit in setpublic boolean member(int el)
public boolean nil()
public BitSet not()
public void notInPlace()
public void notInPlace(int maxBit)
public void notInPlace(int minBit, int maxBit)
private final int numWordsToHold(int el)
public static BitSet of(int el)
public BitSet or(BitSet a)
public void orInPlace(BitSet a)
public void remove(int el)
private void setSize(int nwords)
nwords
- how many words the new set should bepublic int size()
public boolean subset(BitSet a)
public void subtractInPlace(BitSet a)
public int[] toArray()
public String toString()
toString
in class Object
public String toString(String separator)
public String toString(String separator, CharFormatter formatter)
formatter
- An object implementing the CharFormatter interface.
public String toString(String separator, Vector vocabulary)
public String toStringOfHalfWords()
public String toStringOfWords()
public String toStringWithRanges(String separator, CharFormatter formatter)
private static final int wordNumber(int bit)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |