Package com.ibm.wala.util.intset
Interface LongSet
-
- All Known Subinterfaces:
MutableLongSet
- All Known Implementing Classes:
MutableSparseLongSet
,SparseLongSet
public interface LongSet
Set of longs; not necessary mutable TODO: extract a smaller interface?
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
contains(long i)
boolean
containsAny(LongSet set)
void
foreach(LongSetAction action)
Invoke an action on each element of the Setvoid
foreachExcluding(LongSet X, LongSetAction action)
Invoke an action on each element of the Set, excluding elements of Set XLongSet
intersection(LongSet that)
This implementation must not despoil the original value of "this"boolean
isEmpty()
boolean
isSubset(LongSet that)
LongIterator
longIterator()
long
max()
boolean
sameValue(LongSet that)
int
size()
-
-
-
Method Detail
-
contains
boolean contains(long i)
- Returns:
- true iff this set contains long i
-
containsAny
boolean containsAny(LongSet set)
- Returns:
- true iff this set contains integer i
-
intersection
LongSet intersection(LongSet that)
This implementation must not despoil the original value of "this"- Returns:
- a new IntSet which is the intersection 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
-
max
long max()
- Returns:
- maximum integer in this set.
-
sameValue
boolean sameValue(LongSet that)
- Returns:
- true iff
this
has the same value asthat
.
-
isSubset
boolean isSubset(LongSet that)
- Returns:
- true iff
this
is a subset ofthat
.
-
longIterator
LongIterator longIterator()
- Returns:
- a perhaps more efficient iterator
-
foreach
void foreach(LongSetAction action)
Invoke an action on each element of the Set
-
foreachExcluding
void foreachExcluding(LongSet X, LongSetAction action)
Invoke an action on each element of the Set, excluding elements of Set X
-
-