public interface IntSet extends Set<Integer>
Modifier and Type | Method and Description |
---|---|
boolean |
add(int i)
Adds the given int to this set and returns whether the int was present before
|
boolean |
addAll(IntSet set)
Adds all ints from the provided set into this one
|
boolean |
contains(int i)
Whether this set contains the given int
|
boolean |
containsAll(IntSet set)
Whether this set contains all ints in the given IntSet
|
IntStream |
intStream()
A stream of ints representing the data in this set
|
PrimitiveIterator.OfInt |
iterator()
A primtive iterator that allows iteration over the int values.
|
boolean |
remove(int i)
Removes, if present, the int from the set and returns if it was present or not
|
boolean |
removeAll(IntSet set)
Removes all ints from this IntSet that are in the provided IntSet
|
boolean |
retainAll(IntSet c)
Modifies this set to only remove all ints that are not present in the provided IntSet
|
void |
set(int i)
Adds or sets the int without returning whether it was previously set
|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, spliterator, toArray, toArray
parallelStream, removeIf, stream
boolean add(int i)
i
- the int value to addvoid set(int i)
i
- the value to make sure is in the setboolean remove(int i)
i
- the int to removeboolean contains(int i)
i
- the int to checkboolean addAll(IntSet set)
set
- the set of ints to addboolean containsAll(IntSet set)
set
- the set to check if all are presentboolean removeAll(IntSet set)
set
- the ints to remove from this IntSetboolean retainAll(IntSet c)
c
- the ints this set should kepPrimitiveIterator.OfInt iterator()
IntStream intStream()
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.