Class RangeSet

  • All Implemented Interfaces:
    java.lang.Iterable<java.lang.Integer>, java.util.Collection<java.lang.Integer>, java.util.Set<java.lang.Integer>, IntSet
    Direct Known Subclasses:
    RangeSet

    @Deprecated
    public class RangeSet
    extends java.lang.Object
    implements IntSet
    Deprecated.
    since 9.3 This class will no longer be public. Please use IntSets.immutableRangeSet(int) instead.
    Read-only set representing all the integers from 0 to size - 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 returns true if it was set or false if it was already present
      boolean add​(java.lang.Integer integer)
      Deprecated.
       
      boolean addAll​(java.util.Collection<? extends java.lang.Integer> c)
      Deprecated.
       
      boolean addAll​(IntSet set)
      Deprecated.
      Adds all ints from the provided set into this one
      void clear()
      Deprecated.
       
      boolean contains​(int i)
      Deprecated.
      Whether this set contains the given int
      boolean 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 IntSet
      boolean equals​(java.lang.Object o)
      Deprecated.
       
      void 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 the IntSet until all elements have been processed or the action throws an exception.
      int hashCode()
      Deprecated.
       
      java.util.Spliterator.OfInt intSpliterator()
      Deprecated.
      Creates a Spliterator.OfInt over the ints in this set.
      java.util.stream.IntStream intStream()
      Deprecated.
      A stream of ints representing the data in this set
      boolean isEmpty()
      Deprecated.
       
      java.util.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 not
      boolean remove​(java.lang.Object o)
      Deprecated.
       
      boolean removeAll​(java.util.Collection<?> c)
      Deprecated.
       
      boolean removeAll​(IntSet set)
      Deprecated.
      Removes all ints from this IntSet that are in the provided IntSet
      boolean removeIf​(java.util.function.IntPredicate filter)
      Deprecated.
      Removes all of the ints of this set that satisfy the given predicate.
      boolean retainAll​(java.util.Collection<?> c)
      Deprecated.
       
      boolean retainAll​(IntSet c)
      Deprecated.
      Modifies this set to remove all ints that are not present in the provided IntSet
      void set​(int i)
      Deprecated.
      Adds or sets the int without returning whether it was previously set
      int 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.
      java.lang.String toString()
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, toArray
      • Methods inherited from interface org.infinispan.commons.util.IntSet

        stream
      • Methods inherited from interface java.util.Set

        spliterator
    • Constructor Detail

      • RangeSet

        public RangeSet​(int size)
        Deprecated.
    • Method Detail

      • size

        public int size()
        Deprecated.
        Specified by:
        size in interface java.util.Collection<java.lang.Integer>
        Specified by:
        size in interface java.util.Set<java.lang.Integer>
      • isEmpty

        public boolean isEmpty()
        Deprecated.
        Specified by:
        isEmpty in interface java.util.Collection<java.lang.Integer>
        Specified by:
        isEmpty in interface java.util.Set<java.lang.Integer>
      • contains

        public boolean contains​(java.lang.Object o)
        Deprecated.
        Specified by:
        contains in interface java.util.Collection<java.lang.Integer>
        Specified by:
        contains in interface java.util.Set<java.lang.Integer>
      • contains

        public boolean contains​(int i)
        Deprecated.
        Description copied from interface: IntSet
        Whether this set contains the given int
        Specified by:
        contains in interface IntSet
        Parameters:
        i - the int to check
        Returns:
        if the set contains the int
      • 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.
        Specified by:
        iterator in interface java.util.Collection<java.lang.Integer>
        Specified by:
        iterator in interface IntSet
        Specified by:
        iterator in interface java.lang.Iterable<java.lang.Integer>
        Specified by:
        iterator in interface java.util.Set<java.lang.Integer>
        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.
        Specified by:
        toIntArray in interface IntSet
        Returns:
        this int set as an array
      • toArray

        public java.lang.Object[] toArray()
        Deprecated.
        Specified by:
        toArray in interface java.util.Collection<java.lang.Integer>
        Specified by:
        toArray in interface java.util.Set<java.lang.Integer>
      • toArray

        public <T> T[] toArray​(T[] a)
        Deprecated.
        Specified by:
        toArray in interface java.util.Collection<java.lang.Integer>
        Specified by:
        toArray in interface java.util.Set<java.lang.Integer>
      • add

        public boolean add​(java.lang.Integer integer)
        Deprecated.
        Specified by:
        add in interface java.util.Collection<java.lang.Integer>
        Specified by:
        add in interface java.util.Set<java.lang.Integer>
      • remove

        public boolean remove​(java.lang.Object o)
        Deprecated.
        Specified by:
        remove in interface java.util.Collection<java.lang.Integer>
        Specified by:
        remove in interface java.util.Set<java.lang.Integer>
      • 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
        Specified by:
        remove in interface IntSet
        Parameters:
        i - the int to remove
        Returns:
        whether the int was present in the set before it was removed
      • containsAll

        public boolean containsAll​(java.util.Collection<?> c)
        Deprecated.
        Specified by:
        containsAll in interface java.util.Collection<java.lang.Integer>
        Specified by:
        containsAll in interface java.util.Set<java.lang.Integer>
      • 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 interface IntSet
        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 returns true if it was set or false if it was already present
        Specified by:
        add in interface IntSet
        Parameters:
        i - the int value to add
        Returns:
        whether this int 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
        Specified by:
        set in interface IntSet
        Parameters:
        i - the value to make sure is in the set
      • addAll

        public boolean addAll​(IntSet set)
        Deprecated.
        Description copied from interface: IntSet
        Adds all ints from the provided set into this one
        Specified by:
        addAll in interface IntSet
        Parameters:
        set - the set of ints to add
        Returns:
        if this set has a new int in it
      • addAll

        public boolean addAll​(java.util.Collection<? extends java.lang.Integer> c)
        Deprecated.
        Specified by:
        addAll in interface java.util.Collection<java.lang.Integer>
        Specified by:
        addAll in interface java.util.Set<java.lang.Integer>
      • retainAll

        public boolean retainAll​(java.util.Collection<?> c)
        Deprecated.
        Specified by:
        retainAll in interface java.util.Collection<java.lang.Integer>
        Specified by:
        retainAll in interface java.util.Set<java.lang.Integer>
      • 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
        Specified by:
        retainAll in interface IntSet
        Parameters:
        c - the ints this set should kep
        Returns:
        if this set removed any ints
      • removeAll

        public boolean removeAll​(IntSet set)
        Deprecated.
        Description copied from interface: IntSet
        Removes all ints from this IntSet that are in the provided IntSet
        Specified by:
        removeAll in interface IntSet
        Parameters:
        set - the ints to remove from this IntSet
        Returns:
        if this set removed any ints
      • removeAll

        public boolean removeAll​(java.util.Collection<?> c)
        Deprecated.
        Specified by:
        removeAll in interface java.util.Collection<java.lang.Integer>
        Specified by:
        removeAll in interface java.util.Set<java.lang.Integer>
      • clear

        public void clear()
        Deprecated.
        Specified by:
        clear in interface java.util.Collection<java.lang.Integer>
        Specified by:
        clear in interface java.util.Set<java.lang.Integer>
      • equals

        public boolean equals​(java.lang.Object o)
        Deprecated.
        Specified by:
        equals in interface java.util.Collection<java.lang.Integer>
        Specified by:
        equals in interface java.util.Set<java.lang.Integer>
        Overrides:
        equals in class java.lang.Object
      • intStream

        public java.util.stream.IntStream intStream()
        Deprecated.
        Description copied from interface: IntSet
        A stream of ints representing the data in this set
        Specified by:
        intStream in interface IntSet
        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 the 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.
        Specified by:
        forEach in interface IntSet
        Parameters:
        action - The action to be performed for each element
      • forEach

        public void forEach​(java.util.function.Consumer<? super java.lang.Integer> action)
        Deprecated.
        Specified by:
        forEach in interface java.lang.Iterable<java.lang.Integer>
      • intSpliterator

        public java.util.Spliterator.OfInt intSpliterator()
        Deprecated.
        Description copied from interface: IntSet
        Creates a Spliterator.OfInt over the ints in this set.

        The Spliterator.OfInt reports Spliterator.DISTINCT. Implementations should document the reporting of additional characteristic values.

        Specified by:
        intSpliterator in interface IntSet
        Returns:
        a Spliterator.OfInt over the ints in this set
      • removeIf

        public boolean removeIf​(java.util.function.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.
        Specified by:
        removeIf in interface IntSet
        Parameters:
        filter - a predicate which returns true for ints to be removed
        Returns:
        true if any ints were removed
      • hashCode

        public int hashCode()
        Deprecated.
        Specified by:
        hashCode in interface java.util.Collection<java.lang.Integer>
        Specified by:
        hashCode in interface java.util.Set<java.lang.Integer>
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object