| Constructor and Description |
|---|
ImmutableIntSet(IntSet set) |
| 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 |
add(Integer integer) |
boolean |
addAll(Collection<? extends Integer> c) |
boolean |
addAll(IntSet set)
Adds all ints from the provided set into this one
|
void |
clear() |
boolean |
contains(int i)
Whether this set contains the given int
|
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
containsAll(IntSet set)
Whether this set contains all ints in the given IntSet
|
void |
forEach(Consumer<? super Integer> action) |
void |
forEach(IntConsumer action)
Performs the given action for each int of the
IntSet
until all elements have been processed or the action throws an
exception. |
Spliterator.OfInt |
intSpliterator()
Creates a
Spliterator.OfInt over the ints in this set. |
IntStream |
intStream()
A stream of ints representing the data in this set
|
boolean |
isEmpty() |
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 |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
removeAll(IntSet set)
Removes all ints from this IntSet that are in the provided IntSet
|
boolean |
removeIf(IntPredicate filter)
Removes all of the ints of this set that satisfy the given
predicate.
|
boolean |
retainAll(Collection<?> c) |
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
|
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
int[] |
toIntArray()
Returns an array containing all of the elements in this set.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequals, hashCode, spliteratorparallelStream, removeIf, streampublic ImmutableIntSet(IntSet set)
public boolean add(int i)
IntSetpublic void set(int i)
IntSetpublic boolean remove(int i)
IntSetpublic boolean contains(int i)
IntSetpublic boolean addAll(IntSet set)
IntSetpublic boolean containsAll(IntSet set)
IntSetcontainsAll in interface IntSetset - the set to check if all are presentpublic boolean removeAll(IntSet set)
IntSetpublic boolean retainAll(IntSet c)
IntSetpublic int size()
public boolean isEmpty()
public boolean contains(Object o)
public PrimitiveIterator.OfInt iterator()
IntSetpublic int[] toIntArray()
IntSettoIntArray in interface IntSetpublic Object[] toArray()
public <T> T[] toArray(T[] a)
public boolean add(Integer integer)
public boolean remove(Object o)
public boolean containsAll(Collection<?> c)
containsAll in interface Collection<Integer>containsAll in interface Set<Integer>public boolean addAll(Collection<? extends Integer> c)
public boolean retainAll(Collection<?> c)
public boolean removeAll(Collection<?> c)
public void clear()
public IntStream intStream()
IntSetpublic void forEach(IntConsumer action)
IntSetIntSet
until all elements have been processed or the action throws an
exception. Unless otherwise specified by the implementing class,
actions are performed in the order of iteration (if an iteration order
is specified). Exceptions thrown by the action are relayed to the
caller.public Spliterator.OfInt intSpliterator()
IntSetSpliterator.OfInt over the ints in this set.
The Spliterator.OfInt reports Spliterator.DISTINCT.
Implementations should document the reporting of additional
characteristic values.
intSpliterator in interface IntSetSpliterator.OfInt over the ints in this setpublic boolean removeIf(IntPredicate filter)
IntSetCopyright © 2018 JBoss, a division of Red Hat. All rights reserved.