IntSets.immutableSet(IntSet)
@Deprecated public class ImmutableIntSet extends Object
IntSet
.Constructor and Description |
---|
ImmutableIntSet(IntSet set)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(int i)
Adds the given int to this set and returns
true if it was set or false if it was already present |
boolean |
add(Integer integer) |
boolean |
addAll(Collection<? extends Integer> c) |
boolean |
addAll(IntSet set)
Deprecated.
Adds all ints from the provided set into this one
|
void |
clear() |
boolean |
contains(int i)
Deprecated.
Whether this set contains the given int
|
boolean |
contains(Object o)
Deprecated.
|
boolean |
containsAll(Collection<?> c)
Deprecated.
|
boolean |
containsAll(IntSet set)
Deprecated.
Whether this set contains all ints in the given IntSet
|
void |
forEach(Consumer<? super Integer> action)
Deprecated.
|
void |
forEach(IntConsumer action)
Deprecated.
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()
Deprecated.
Creates a
Spliterator.OfInt over the ints in this set. |
IntStream |
intStream()
Deprecated.
A stream of ints representing the data in this set
|
boolean |
isEmpty()
Deprecated.
|
PrimitiveIterator.OfInt |
iterator()
Deprecated.
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 |
removeIf(Predicate<? super Integer> filter) |
boolean |
retainAll(Collection<?> c) |
boolean |
retainAll(IntSet c)
Modifies this set to 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()
Deprecated.
|
Object[] |
toArray()
Deprecated.
|
<T> T[] |
toArray(T[] a)
Deprecated.
|
int[] |
toIntArray()
Deprecated.
Returns an array containing all of the elements in this set.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode, spliterator
parallelStream
public ImmutableIntSet(IntSet set)
public boolean contains(int i)
IntSet
i
- the int to checkpublic boolean addAll(IntSet set)
IntSet
public boolean containsAll(IntSet set)
IntSet
set
- the set to check if all are presentpublic int size()
public boolean isEmpty()
public boolean contains(Object o)
public PrimitiveIterator.OfInt iterator()
IntSet
public int[] toIntArray()
IntSet
public Object[] toArray()
public <T> T[] toArray(T[] a)
public boolean containsAll(Collection<?> c)
public IntStream intStream()
IntSet
public void forEach(IntConsumer action)
IntSet
IntSet
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.action
- The action to be performed for each elementpublic Spliterator.OfInt intSpliterator()
IntSet
Spliterator.OfInt
over the ints in this set.
The Spliterator.OfInt
reports Spliterator.DISTINCT
.
Implementations should document the reporting of additional
characteristic values.
Spliterator.OfInt
over the ints in this setpublic boolean add(int i)
IntSet
true
if it was set or false
if it was already presentpublic void set(int i)
IntSet
public boolean remove(int i)
IntSet
public boolean remove(Object o)
public boolean removeAll(IntSet set)
IntSet
public boolean removeAll(Collection<?> c)
public boolean retainAll(IntSet c)
IntSet
public boolean retainAll(Collection<?> c)
public boolean add(Integer integer)
public boolean addAll(Collection<? extends Integer> c)
public void clear()
public boolean removeIf(Predicate<? super Integer> filter)
removeIf
in interface Collection<Integer>
public boolean removeIf(IntPredicate filter)
IntSet
Copyright © 2021 JBoss by Red Hat. All rights reserved.