类 BitSet
- java.lang.Object
-
- org.antlr.runtime.BitSet
-
- 所有已实现的接口:
java.lang.Cloneable
public class BitSet extends java.lang.Object implements java.lang.CloneableA 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.
-
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 voidadd(int el)or this element into this set (grow as necessary to accommodate)java.lang.Objectclone()booleanequals(java.lang.Object other)voidgrowToInclude(int bit)Grows the set to a larger number of bits.booleanisNil()intlengthInLongWords()return how much space is being used by the bits array not how many actually have member bits on.booleanmember(int el)intnumBits()static BitSetof(int el)static BitSetof(int a, int b)static BitSetof(int a, int b, int c)static BitSetof(int a, int b, int c, int d)BitSetor(BitSet a)return this | a in a new setvoidorInPlace(BitSet a)voidremove(int el)intsize()int[]toArray()Is this contained within a?long[]toPackedArray()java.lang.StringtoString()java.lang.StringtoString(java.lang.String[] tokenNames)
-
-
-
构造器详细资料
-
BitSet
public BitSet()
Construct a bitset of size one word (64 bits)
-
BitSet
public BitSet(long[] bits_)
Construction from a static array of longs
-
BitSet
public BitSet(java.util.List<java.lang.Integer> items)
Construction from a list of integers
-
BitSet
public BitSet(int nbits)
Construct a bitset given the size- 参数:
nbits- The size of the bitset in bits
-
-
方法详细资料
-
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.- 参数:
bit- element that must fit in set
-
orInPlace
public void orInPlace(BitSet a)
-
clone
public java.lang.Object clone()
- 覆盖:
clone在类中java.lang.Object
-
size
public int size()
-
equals
public boolean equals(java.lang.Object other)
- 覆盖:
equals在类中java.lang.Object
-
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()
-
toString
public java.lang.String toString()
- 覆盖:
toString在类中java.lang.Object
-
toString
public java.lang.String toString(java.lang.String[] tokenNames)
-
-