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
Modifier and TypeMethodDescriptionbooleancontains(long i) booleancontainsAny(LongSet set) voidforeach(LongSetAction action) Invoke an action on each element of the SetvoidforeachExcluding(LongSet X, LongSetAction action) Invoke an action on each element of the Set, excluding elements of Set X@Nullable LongSetintersection(LongSet that) This implementation must not despoil the original value of "this"booleanisEmpty()booleanlongmax()booleanintsize()
-
Method Details
-
contains
boolean contains(long i) - Returns:
- true iff this set contains long i
-
containsAny
- Returns:
- true iff this set contains integer i
-
intersection
-
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
- Returns:
- true iff
thishas the same value asthat.
-
isSubset
- Returns:
- true iff
thisis a subset ofthat.
-
longIterator
LongIterator longIterator()- 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
-