Package org.infinispan.commons.util
Class ImmutableIntSet
- java.lang.Object
-
- org.infinispan.commons.util.ImmutableIntSet
-
- All Implemented Interfaces:
java.lang.Iterable<java.lang.Integer>
,java.util.Collection<java.lang.Integer>
,java.util.Set<java.lang.Integer>
,IntSet
@Deprecated public class ImmutableIntSet extends java.lang.Object
Deprecated.since 9.3 This class will no longer be public, please useIntSets.immutableSet(IntSet)
Immutable wrapper forIntSet
.- Since:
- 9.2
- Author:
- Dan Berindei
-
-
Constructor Summary
Constructors Constructor Description ImmutableIntSet(IntSet set)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
add(int i)
Adds the given int to this set and returnstrue
if it was set orfalse
if it was already presentboolean
add(java.lang.Integer integer)
boolean
addAll(java.util.Collection<? extends java.lang.Integer> c)
boolean
addAll(IntSet set)
Deprecated.Adds all ints from the provided set into this onevoid
clear()
boolean
contains(int i)
Deprecated.Whether this set contains the given intboolean
contains(java.lang.Object o)
Deprecated.boolean
containsAll(java.util.Collection<?> c)
Deprecated.boolean
containsAll(IntSet set)
Deprecated.Whether this set contains all ints in the given IntSetvoid
forEach(java.util.function.Consumer<? super java.lang.Integer> action)
Deprecated.void
forEach(java.util.function.IntConsumer action)
Deprecated.Performs the given action for each int of theIntSet
until all elements have been processed or the action throws an exception.java.util.Spliterator.OfInt
intSpliterator()
Deprecated.Creates aSpliterator.OfInt
over the ints in this set.java.util.stream.IntStream
intStream()
Deprecated.A stream of ints representing the data in this setboolean
isEmpty()
Deprecated.java.util.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 notboolean
remove(java.lang.Object o)
boolean
removeAll(java.util.Collection<?> c)
boolean
removeAll(IntSet set)
Removes all ints from this IntSet that are in the provided IntSetboolean
removeIf(java.util.function.IntPredicate filter)
Removes all of the ints of this set that satisfy the given predicate.boolean
removeIf(java.util.function.Predicate<? super java.lang.Integer> filter)
boolean
retainAll(java.util.Collection<?> c)
boolean
retainAll(IntSet c)
Modifies this set to remove all ints that are not present in the provided IntSetvoid
set(int i)
Adds or sets the int without returning whether it was previously setint
size()
Deprecated.java.lang.Object[]
toArray()
Deprecated.<T> T[]
toArray(T[] a)
Deprecated.int[]
toIntArray()
Deprecated.Returns an array containing all of the elements in this set.
-
-
-
Constructor Detail
-
ImmutableIntSet
public ImmutableIntSet(IntSet set)
Deprecated.
-
-
Method Detail
-
contains
public boolean contains(int i)
Deprecated.Description copied from interface:IntSet
Whether this set contains the given int- Parameters:
i
- the int to check- Returns:
- if the set contains the int
-
addAll
public boolean addAll(IntSet set)
Deprecated.Description copied from interface:IntSet
Adds all ints from the provided set into this one
-
containsAll
public boolean containsAll(IntSet set)
Deprecated.Description copied from interface:IntSet
Whether this set contains all ints in the given IntSet- Parameters:
set
- the set to check if all are present- Returns:
- if the set contains all the ints
-
size
public int size()
Deprecated.
-
isEmpty
public boolean isEmpty()
Deprecated.
-
contains
public boolean contains(java.lang.Object o)
Deprecated.
-
iterator
public java.util.PrimitiveIterator.OfInt iterator()
Deprecated.Description copied from interface:IntSet
A primtive iterator that allows iteration over the int values. This iterator supports removal if the set is modifiable.- Returns:
- the iterator
-
toIntArray
public int[] toIntArray()
Deprecated.Description copied from interface:IntSet
Returns an array containing all of the elements in this set. If this set makes any guarantees as to what order its elements are returned by its iterator, this method must return the elements in the same order.- Returns:
- this int set as an array
-
toArray
public java.lang.Object[] toArray()
Deprecated.
-
toArray
public <T> T[] toArray(T[] a)
Deprecated.
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
Deprecated.
-
intStream
public java.util.stream.IntStream intStream()
Deprecated.Description copied from interface:IntSet
A stream of ints representing the data in this set- Returns:
- the stream
-
forEach
public void forEach(java.util.function.IntConsumer action)
Deprecated.Description copied from interface:IntSet
Performs the given action for each int of theIntSet
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.- Parameters:
action
- The action to be performed for each element
-
forEach
public void forEach(java.util.function.Consumer<? super java.lang.Integer> action)
Deprecated.
-
intSpliterator
public java.util.Spliterator.OfInt intSpliterator()
Deprecated.Description copied from interface:IntSet
Creates aSpliterator.OfInt
over the ints in this set.The
Spliterator.OfInt
reportsSpliterator.DISTINCT
. Implementations should document the reporting of additional characteristic values.- Returns:
- a
Spliterator.OfInt
over the ints in this set
-
add
public boolean add(int i)
Description copied from interface:IntSet
Adds the given int to this set and returnstrue
if it was set orfalse
if it was already present
-
set
public void set(int i)
Description copied from interface:IntSet
Adds or sets the int without returning whether it was previously set
-
remove
public boolean remove(int i)
Description copied from interface:IntSet
Removes, if present, the int from the set and returns if it was present or not
-
remove
public boolean remove(java.lang.Object o)
- Specified by:
remove
in interfacejava.util.Collection<java.lang.Integer>
- Specified by:
remove
in interfacejava.util.Set<java.lang.Integer>
-
removeAll
public boolean removeAll(IntSet set)
Description copied from interface:IntSet
Removes all ints from this IntSet that are in the provided IntSet
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAll
in interfacejava.util.Collection<java.lang.Integer>
- Specified by:
removeAll
in interfacejava.util.Set<java.lang.Integer>
-
retainAll
public boolean retainAll(IntSet c)
Description copied from interface:IntSet
Modifies this set to remove all ints that are not present in the provided IntSet
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAll
in interfacejava.util.Collection<java.lang.Integer>
- Specified by:
retainAll
in interfacejava.util.Set<java.lang.Integer>
-
add
public boolean add(java.lang.Integer integer)
- Specified by:
add
in interfacejava.util.Collection<java.lang.Integer>
- Specified by:
add
in interfacejava.util.Set<java.lang.Integer>
-
addAll
public boolean addAll(java.util.Collection<? extends java.lang.Integer> c)
- Specified by:
addAll
in interfacejava.util.Collection<java.lang.Integer>
- Specified by:
addAll
in interfacejava.util.Set<java.lang.Integer>
-
clear
public void clear()
- Specified by:
clear
in interfacejava.util.Collection<java.lang.Integer>
- Specified by:
clear
in interfacejava.util.Set<java.lang.Integer>
-
removeIf
public boolean removeIf(java.util.function.Predicate<? super java.lang.Integer> filter)
- Specified by:
removeIf
in interfacejava.util.Collection<java.lang.Integer>
-
removeIf
public boolean removeIf(java.util.function.IntPredicate filter)
Description copied from interface:IntSet
Removes all of the ints of this set that satisfy the given predicate. Errors or runtime exceptions thrown during iteration or by the predicate are relayed to the caller.
-
-