Package org.infinispan.commons.util
Class RangeSet
- java.lang.Object
-
- org.infinispan.commons.util.RangeSet
-
- 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 RangeSet extends java.lang.Object implements IntSet
Deprecated.since 9.3 This class will no longer be public. Please useIntSets.immutableRangeSet(int)instead.Read-only set representing all the integers from0tosize - 1(inclusive).- Since:
- 9.0
- Author:
- Dan Berindei
-
-
Constructor Summary
Constructors Constructor Description RangeSet(int size)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanadd(int i)Deprecated.Adds the given int to this set and returnstrueif it was set orfalseif it was already presentbooleanadd(java.lang.Integer integer)Deprecated.booleanaddAll(java.util.Collection<? extends java.lang.Integer> c)Deprecated.booleanaddAll(IntSet set)Deprecated.Adds all ints from the provided set into this onevoidclear()Deprecated.booleancontains(int i)Deprecated.Whether this set contains the given intbooleancontains(java.lang.Object o)Deprecated.booleancontainsAll(java.util.Collection<?> c)Deprecated.booleancontainsAll(IntSet set)Deprecated.Whether this set contains all ints in the given IntSetbooleanequals(java.lang.Object o)Deprecated.voidforEach(java.util.function.Consumer<? super java.lang.Integer> action)Deprecated.voidforEach(java.util.function.IntConsumer action)Deprecated.Performs the given action for each int of theIntSetuntil all elements have been processed or the action throws an exception.inthashCode()Deprecated.java.util.Spliterator.OfIntintSpliterator()Deprecated.Creates aSpliterator.OfIntover the ints in this set.java.util.stream.IntStreamintStream()Deprecated.A stream of ints representing the data in this setbooleanisEmpty()Deprecated.java.util.PrimitiveIterator.OfIntiterator()Deprecated.A primtive iterator that allows iteration over the int values.booleanremove(int i)Deprecated.Removes, if present, the int from the set and returns if it was present or notbooleanremove(java.lang.Object o)Deprecated.booleanremoveAll(java.util.Collection<?> c)Deprecated.booleanremoveAll(IntSet set)Deprecated.Removes all ints from this IntSet that are in the provided IntSetbooleanremoveIf(java.util.function.IntPredicate filter)Deprecated.Removes all of the ints of this set that satisfy the given predicate.booleanretainAll(java.util.Collection<?> c)Deprecated.booleanretainAll(IntSet c)Deprecated.Modifies this set to remove all ints that are not present in the provided IntSetvoidset(int i)Deprecated.Adds or sets the int without returning whether it was previously setintsize()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.java.lang.StringtoString()Deprecated.
-
-
-
Method Detail
-
size
public int size()
Deprecated.- Specified by:
sizein interfacejava.util.Collection<java.lang.Integer>- Specified by:
sizein interfacejava.util.Set<java.lang.Integer>
-
isEmpty
public boolean isEmpty()
Deprecated.- Specified by:
isEmptyin interfacejava.util.Collection<java.lang.Integer>- Specified by:
isEmptyin interfacejava.util.Set<java.lang.Integer>
-
contains
public boolean contains(java.lang.Object o)
Deprecated.- Specified by:
containsin interfacejava.util.Collection<java.lang.Integer>- Specified by:
containsin interfacejava.util.Set<java.lang.Integer>
-
contains
public boolean contains(int i)
Deprecated.Description copied from interface:IntSetWhether this set contains the given int
-
iterator
public java.util.PrimitiveIterator.OfInt iterator()
Deprecated.Description copied from interface:IntSetA primtive iterator that allows iteration over the int values. This iterator supports removal if the set is modifiable.
-
toIntArray
public int[] toIntArray()
Deprecated.Description copied from interface:IntSetReturns 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.- Specified by:
toIntArrayin interfaceIntSet- Returns:
- this int set as an array
-
toArray
public java.lang.Object[] toArray()
Deprecated.- Specified by:
toArrayin interfacejava.util.Collection<java.lang.Integer>- Specified by:
toArrayin interfacejava.util.Set<java.lang.Integer>
-
toArray
public <T> T[] toArray(T[] a)
Deprecated.- Specified by:
toArrayin interfacejava.util.Collection<java.lang.Integer>- Specified by:
toArrayin interfacejava.util.Set<java.lang.Integer>
-
add
public boolean add(java.lang.Integer integer)
Deprecated.- Specified by:
addin interfacejava.util.Collection<java.lang.Integer>- Specified by:
addin interfacejava.util.Set<java.lang.Integer>
-
remove
public boolean remove(java.lang.Object o)
Deprecated.- Specified by:
removein interfacejava.util.Collection<java.lang.Integer>- Specified by:
removein interfacejava.util.Set<java.lang.Integer>
-
remove
public boolean remove(int i)
Deprecated.Description copied from interface:IntSetRemoves, if present, the int from the set and returns if it was present or not
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
Deprecated.- Specified by:
containsAllin interfacejava.util.Collection<java.lang.Integer>- Specified by:
containsAllin interfacejava.util.Set<java.lang.Integer>
-
containsAll
public boolean containsAll(IntSet set)
Deprecated.Description copied from interface:IntSetWhether this set contains all ints in the given IntSet- Specified by:
containsAllin interfaceIntSet- Parameters:
set- the set to check if all are present- Returns:
- if the set contains all the ints
-
add
public boolean add(int i)
Deprecated.Description copied from interface:IntSetAdds the given int to this set and returnstrueif it was set orfalseif it was already present
-
set
public void set(int i)
Deprecated.Description copied from interface:IntSetAdds or sets the int without returning whether it was previously set
-
addAll
public boolean addAll(IntSet set)
Deprecated.Description copied from interface:IntSetAdds all ints from the provided set into this one
-
addAll
public boolean addAll(java.util.Collection<? extends java.lang.Integer> c)
Deprecated.- Specified by:
addAllin interfacejava.util.Collection<java.lang.Integer>- Specified by:
addAllin interfacejava.util.Set<java.lang.Integer>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
Deprecated.- Specified by:
retainAllin interfacejava.util.Collection<java.lang.Integer>- Specified by:
retainAllin interfacejava.util.Set<java.lang.Integer>
-
retainAll
public boolean retainAll(IntSet c)
Deprecated.Description copied from interface:IntSetModifies this set to remove all ints that are not present in the provided IntSet
-
removeAll
public boolean removeAll(IntSet set)
Deprecated.Description copied from interface:IntSetRemoves all ints from this IntSet that are in the provided IntSet
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
Deprecated.- Specified by:
removeAllin interfacejava.util.Collection<java.lang.Integer>- Specified by:
removeAllin interfacejava.util.Set<java.lang.Integer>
-
clear
public void clear()
Deprecated.- Specified by:
clearin interfacejava.util.Collection<java.lang.Integer>- Specified by:
clearin interfacejava.util.Set<java.lang.Integer>
-
equals
public boolean equals(java.lang.Object o)
Deprecated.- Specified by:
equalsin interfacejava.util.Collection<java.lang.Integer>- Specified by:
equalsin interfacejava.util.Set<java.lang.Integer>- Overrides:
equalsin classjava.lang.Object
-
intStream
public java.util.stream.IntStream intStream()
Deprecated.Description copied from interface:IntSetA stream of ints representing the data in this set
-
forEach
public void forEach(java.util.function.IntConsumer action)
Deprecated.Description copied from interface:IntSetPerforms the given action for each int of theIntSetuntil 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.
-
forEach
public void forEach(java.util.function.Consumer<? super java.lang.Integer> action)
Deprecated.- Specified by:
forEachin interfacejava.lang.Iterable<java.lang.Integer>
-
intSpliterator
public java.util.Spliterator.OfInt intSpliterator()
Deprecated.Description copied from interface:IntSetCreates aSpliterator.OfIntover the ints in this set.The
Spliterator.OfIntreportsSpliterator.DISTINCT. Implementations should document the reporting of additional characteristic values.- Specified by:
intSpliteratorin interfaceIntSet- Returns:
- a
Spliterator.OfIntover the ints in this set
-
removeIf
public boolean removeIf(java.util.function.IntPredicate filter)
Deprecated.Description copied from interface:IntSetRemoves 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.
-
hashCode
public int hashCode()
Deprecated.- Specified by:
hashCodein interfacejava.util.Collection<java.lang.Integer>- Specified by:
hashCodein interfacejava.util.Set<java.lang.Integer>- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.lang.Object
-
-