程序包 org.antlr.misc
接口 IntSet
-
- 所有已知实现类:
BitSet,IntervalSet
public interface IntSetA generic set of ints that has an efficient implementation, BitSet, which is a compressed bitset and is useful for ints that are small, for example less than 500 or so, and w/o many ranges. For ranges with large values like unicode char sets, this is not very efficient. Consider using IntervalSet. Not all methods in IntervalSet are implemented.- 另请参阅:
BitSet,IntervalSet
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 voidadd(int el)Add an element to the setvoidaddAll(IntSet set)Add all elements from incoming set to this set.IntSetand(IntSet a)Return the intersection of this set with the argument, creating a new set.IntSetcomplement(IntSet elements)booleanequals(java.lang.Object obj)intgetSingleElement()booleanisNil()booleanmember(int el)IntSetor(IntSet a)voidremove(int el)remove this element from this setintsize()Return the size of this set (not the underlying implementation's allocated memory size, for example).IntSetsubtract(IntSet a)java.util.List<java.lang.Integer>toList()java.lang.StringtoString()java.lang.StringtoString(Grammar g)
-
-
-
方法详细资料
-
add
void add(int el)
Add an element to the set
-
addAll
void addAll(IntSet set)
Add all elements from incoming set to this set. Can limit to set of its own type.
-
and
IntSet and(IntSet a)
Return the intersection of this set with the argument, creating a new set.
-
size
int size()
Return the size of this set (not the underlying implementation's allocated memory size, for example).
-
isNil
boolean isNil()
-
equals
boolean equals(java.lang.Object obj)
- 覆盖:
equals在类中java.lang.Object
-
getSingleElement
int getSingleElement()
-
member
boolean member(int el)
-
remove
void remove(int el)
remove this element from this set
-
toList
java.util.List<java.lang.Integer> toList()
-
toString
java.lang.String toString()
- 覆盖:
toString在类中java.lang.Object
-
toString
java.lang.String toString(Grammar g)
-
-