Package org.infinispan.commons.util
Class RangeSet
- java.lang.Object
-
- org.infinispan.commons.util.RangeSet
-
@Deprecated public class RangeSet extends 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 from0
tosize - 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 boolean
add(int i)
Deprecated.Adds the given int to this set and returnstrue
if it was set orfalse
if it was already presentboolean
add(Integer integer)
Deprecated.boolean
addAll(Collection<? extends Integer> c)
Deprecated.boolean
addAll(IntSet set)
Deprecated.Adds all ints from the provided set into this onevoid
clear()
Deprecated.boolean
contains(int i)
Deprecated.Whether this set contains the given intboolean
contains(Object o)
Deprecated.boolean
containsAll(Collection<?> c)
Deprecated.boolean
containsAll(IntSet set)
Deprecated.Whether this set contains all ints in the given IntSetboolean
equals(Object o)
Deprecated.void
forEach(Consumer<? super Integer> action)
Deprecated.void
forEach(IntConsumer action)
Deprecated.Performs the given action for each int of theIntSet
until all elements have been processed or the action throws an exception.int
hashCode()
Deprecated.Spliterator.OfInt
intSpliterator()
Deprecated.Creates aSpliterator.OfInt
over the ints in this set.IntStream
intStream()
Deprecated.A stream of ints representing the data in this setboolean
isEmpty()
Deprecated.PrimitiveIterator.OfInt
iterator()
Deprecated.A primtive iterator that allows iteration over the int values.boolean
remove(int i)
Deprecated.Removes, if present, the int from the set and returns if it was present or notboolean
remove(Object o)
Deprecated.boolean
removeAll(Collection<?> c)
Deprecated.boolean
removeAll(IntSet set)
Deprecated.Removes all ints from this IntSet that are in the provided IntSetboolean
removeIf(IntPredicate filter)
Deprecated.Removes all of the ints of this set that satisfy the given predicate.boolean
retainAll(Collection<?> c)
Deprecated.boolean
retainAll(IntSet c)
Deprecated.Modifies this set to remove all ints that are not present in the provided IntSetvoid
set(int i)
Deprecated.Adds or sets the int without returning whether it was previously setint
size()
Deprecated.Object[]
toArray()
Deprecated.<T> T[]
toArray(T[] a)
Deprecated.byte[]
toBitSet()
Deprecated.Returns a byte array that has a bit set for each int in this set where each byte represents 8 numbers.int[]
toIntArray()
Deprecated.Returns an array containing all of the elements in this set.String
toString()
Deprecated.
-
-
-
Method Detail
-
size
public int size()
Deprecated.
-
isEmpty
public boolean isEmpty()
Deprecated.
-
contains
public boolean contains(Object o)
Deprecated.
-
contains
public boolean contains(int i)
Deprecated.Description copied from interface:IntSet
Whether this set contains the given int
-
iterator
public 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.
-
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.- Specified by:
toIntArray
in interfaceIntSet
- Returns:
- this int set as an array
-
toBitSet
public byte[] toBitSet()
Deprecated.Description copied from interface:IntSet
Returns a byte array that has a bit set for each int in this set where each byte represents 8 numbers. That is if the ints 2, 5 and 9 are set this will return a byte array consisting of 2 bytes in little-endian representation of those values.Depending upon the implementation this array may or may not have trailing bytes and may be condensed to save space.
-
toArray
public Object[] toArray()
Deprecated.
-
toArray
public <T> T[] toArray(T[] a)
Deprecated.
-
add
public boolean add(Integer integer)
Deprecated.
-
remove
public boolean remove(Object o)
Deprecated.
-
remove
public boolean remove(int i)
Deprecated.Description copied from interface:IntSet
Removes, if present, the int from the set and returns if it was present or not
-
containsAll
public boolean containsAll(Collection<?> c)
Deprecated.
-
containsAll
public boolean containsAll(IntSet set)
Deprecated.Description copied from interface:IntSet
Whether this set contains all ints in the given IntSet- Specified by:
containsAll
in 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: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)
Deprecated.Description copied from interface:IntSet
Adds or sets the int without returning whether it was previously set
-
addAll
public boolean addAll(IntSet set)
Deprecated.Description copied from interface:IntSet
Adds all ints from the provided set into this one
-
addAll
public boolean addAll(Collection<? extends Integer> c)
Deprecated.
-
retainAll
public boolean retainAll(Collection<?> c)
Deprecated.
-
retainAll
public boolean retainAll(IntSet c)
Deprecated.Description copied from interface:IntSet
Modifies 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:IntSet
Removes all ints from this IntSet that are in the provided IntSet
-
removeAll
public boolean removeAll(Collection<?> c)
Deprecated.
-
clear
public void clear()
Deprecated.
-
equals
public boolean equals(Object o)
Deprecated.
-
intStream
public IntStream intStream()
Deprecated.Description copied from interface:IntSet
A stream of ints representing the data in this set
-
forEach
public void forEach(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.
-
intSpliterator
public 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.- Specified by:
intSpliterator
in interfaceIntSet
- Returns:
- a
Spliterator.OfInt
over the ints in this set
-
removeIf
public boolean removeIf(IntPredicate filter)
Deprecated.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.
-
hashCode
public int hashCode()
Deprecated.
-
toString
public String toString()
Deprecated.
-
-