Package com.ibm.wala.util.intset
Interface IntSet
-
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
MutableIntSet
- All Known Implementing Classes:
BimodalMutableIntSet,BitVectorIntSet,EmptyIntSet,MutableSharedBitVectorIntSet,MutableSparseIntSet,SemiSparseMutableIntSet,SparseIntSet,TunedMutableSparseIntSet
public interface IntSet extends Serializable
Set of integers; not necessary mutable TODO: extract a smaller interface?
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontains(int i)booleancontainsAny(IntSet set)voidforeach(IntSetAction action)Invoke an action on each element of the SetvoidforeachExcluding(IntSet X, IntSetAction action)Invoke an action on each element of the Set, excluding elements of Set XIntSetintersection(IntSet that)This implementation must not despoil the original value of "this"IntIteratorintIterator()booleanisEmpty()booleanisSubset(IntSet that)intmax()booleansameValue(IntSet that)intsize()IntSetunion(IntSet that)This implementation must not despoil the original value of "this"
-
-
-
Method Detail
-
contains
boolean contains(int i)
- Returns:
- true iff this set contains integer i
-
containsAny
boolean containsAny(IntSet set)
- Returns:
- true iff this set contains integer i
-
intersection
IntSet intersection(IntSet that)
This implementation must not despoil the original value of "this"- Returns:
- a new IntSet which is the intersection of this and that
-
union
IntSet union(IntSet that)
This implementation must not despoil the original value of "this"- Returns:
- a new IntSet containing all elements of this and that
-
isEmpty
boolean isEmpty()
- Returns:
- true iff this set is empty
-
size
int size()
- Returns:
- the number of elements in this set
-
intIterator
IntIterator intIterator()
- Returns:
- a perhaps more efficient iterator
-
foreach
void foreach(IntSetAction action)
Invoke an action on each element of the Set
-
foreachExcluding
void foreachExcluding(IntSet X, IntSetAction action)
Invoke an action on each element of the Set, excluding elements of Set X
-
max
int max()
- Returns:
- maximum integer in this set.
-
sameValue
boolean sameValue(IntSet that)
- Returns:
- true iff
thishas the same value asthat.
-
isSubset
boolean isSubset(IntSet that)
- Returns:
- true iff
thisis a subset ofthat.
-
-