Package org.infinispan.commons.util
Class RangeSet
java.lang.Object
org.infinispan.commons.util.RangeSet
Deprecated.
Read-only set representing all the integers from
0 to size - 1 (inclusive).- Since:
- 9.0
- Author:
- Dan Berindei
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(int i) Deprecated.Adds the given int to this set and returnstrueif it was set orfalseif it was already presentbooleanDeprecated.booleanaddAll(Collection<? extends Integer> c) Deprecated.booleanDeprecated.Adds all ints from the provided set into this onevoidclear()Deprecated.booleancontains(int i) Deprecated.Whether this set contains the given intbooleanDeprecated.booleancontainsAll(Collection<?> c) Deprecated.booleancontainsAll(IntSet set) Deprecated.Whether this set contains all ints in the given IntSetbooleanDeprecated.voidDeprecated.voidforEach(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.Deprecated.Creates aSpliterator.OfIntover the ints in this set.Deprecated.A stream of ints representing the data in this setbooleanisEmpty()Deprecated.iterator()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 notbooleanDeprecated.booleanremoveAll(Collection<?> c) Deprecated.booleanDeprecated.Removes all ints from this IntSet that are in the provided IntSetbooleanremoveIf(IntPredicate filter) Deprecated.Removes all of the ints of this set that satisfy the given predicate.booleanretainAll(Collection<?> c) Deprecated.booleanDeprecated.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.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[]Deprecated.Returns an array containing all of the elements in this set.toString()Deprecated.
-
Constructor Details
-
RangeSet
public RangeSet(int size) Deprecated.
-
-
Method Details
-
size
public int size()Deprecated. -
isEmpty
public boolean isEmpty()Deprecated. -
contains
Deprecated. -
contains
public boolean contains(int i) Deprecated.Description copied from interface:IntSetWhether this set contains the given int -
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
-
toBitSet
public byte[] toBitSet()Deprecated.Description copied from interface:IntSetReturns 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
Deprecated. -
toArray
public <T> T[] toArray(T[] a) Deprecated. -
add
Deprecated. -
remove
Deprecated. -
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
Deprecated. -
containsAll
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
Deprecated.Description copied from interface:IntSetAdds all ints from the provided set into this one -
addAll
Deprecated. -
retainAll
Deprecated. -
retainAll
Deprecated.Description copied from interface:IntSetModifies this set to remove all ints that are not present in the provided IntSet -
removeAll
Deprecated.Description copied from interface:IntSetRemoves all ints from this IntSet that are in the provided IntSet -
removeAll
Deprecated. -
clear
public void clear()Deprecated. -
equals
Deprecated. -
intStream
Deprecated.Description copied from interface:IntSetA stream of ints representing the data in this set -
forEach
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
Deprecated. -
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
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. -
toString
Deprecated.
-
IntSets.immutableRangeSet(int)instead.