|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IntSet
A 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
Method Summary | |
---|---|
void |
add(int el)
Add an element to the set |
void |
addAll(IntSet set)
Add all elements from incoming set to this set. |
IntSet |
and(IntSet a)
Return the intersection of this set with the argument, creating a new set. |
IntSet |
complement(IntSet elements)
|
boolean |
equals(java.lang.Object obj)
|
int |
getSingleElement()
|
boolean |
isNil()
|
boolean |
member(int el)
|
IntSet |
or(IntSet a)
|
void |
remove(int el)
remove this element from this set |
int |
size()
Return the size of this set (not the underlying implementation's allocated memory size, for example). |
IntSet |
subtract(IntSet a)
|
java.util.List |
toList()
|
java.lang.String |
toString()
|
java.lang.String |
toString(Grammar g)
|
Method Detail |
---|
void add(int el)
void addAll(IntSet set)
IntSet and(IntSet a)
IntSet complement(IntSet elements)
IntSet or(IntSet a)
IntSet subtract(IntSet a)
int size()
boolean isNil()
boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
int getSingleElement()
boolean member(int el)
void remove(int el)
java.util.List toList()
java.lang.String toString()
toString
in class java.lang.Object
java.lang.String toString(Grammar g)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |