Interface IntSet
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
MutableIntSet
- All Known Implementing Classes:
BimodalMutableIntSet
,BitVectorIntSet
,EmptyIntSet
,MutableSharedBitVectorIntSet
,MutableSparseIntSet
,SemiSparseMutableIntSet
,SparseIntSet
,TunedMutableSparseIntSet
Set of integers; not necessary mutable TODO: extract a smaller interface?
-
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(int i) boolean
containsAny
(IntSet set) void
foreach
(IntSetAction action) Invoke an action on each element of the Setvoid
foreachExcluding
(IntSet X, IntSetAction action) Invoke an action on each element of the Set, excluding elements of Set Xintersection
(IntSet that) This implementation must not despoil the original value of "this"boolean
isEmpty()
boolean
int
max()
boolean
int
size()
This implementation must not despoil the original value of "this"
-
Method Details
-
contains
boolean contains(int i) - Returns:
- true iff this set contains integer i
-
containsAny
- Returns:
- true iff this set contains integer i
-
intersection
-
union
-
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
Invoke an action on each element of the Set -
foreachExcluding
Invoke an action on each element of the Set, excluding elements of Set X -
max
int max()- Returns:
- maximum integer in this set.
-
sameValue
- Returns:
- true iff
this
has the same value asthat
.
-
isSubset
- Returns:
- true iff
this
is a subset ofthat
.
-