Class SmallIntSet

    • Constructor Detail

      • SmallIntSet

        public SmallIntSet()
        Deprecated.
      • SmallIntSet

        public SmallIntSet​(int initialRange)
        Deprecated.
        Create a new IntSet and pre-allocate space for elements 0..initialRange-1.
      • SmallIntSet

        public SmallIntSet​(Set<Integer> set)
        Deprecated.
    • Method Detail

      • of

        public static SmallIntSet of​(int i1)
        Deprecated.
      • of

        public static SmallIntSet of​(int i1,
                                     int i2)
        Deprecated.
      • of

        public static SmallIntSet of​(int i1,
                                     int i2,
                                     int i3)
        Deprecated.
      • of

        public static SmallIntSet of​(int... elements)
        Deprecated.
      • from

        public static SmallIntSet from​(Set<Integer> set)
        Deprecated.
        Either converts the given set to an IntSet if it is one or creates a new IntSet and copies the contents
        Parameters:
        set -
        Returns:
      • capacity

        public int capacity()
        Deprecated.
      • contains

        public boolean contains​(Integer o)
        Deprecated.
      • contains

        public boolean contains​(int i)
        Deprecated.
        Check if the set contains an integer without boxing the parameter.
        Specified by:
        contains in interface IntSet
        Parameters:
        i - the int to check
        Returns:
        if the set contains the int
      • 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
      • add

        public boolean add​(int i)
        Deprecated.
        Add an integer to the set without boxing the parameter.
        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.
        Add an integer to the set without boxing the parameter or checking if the integer was already present in the set.
        Specified by:
        set in interface IntSet
        Parameters:
        i - the value to make sure is in the set
      • set

        public void set​(int i,
                        boolean value)
        Deprecated.
        If value is true, add the integer to the set, otherwise remove the integer from the set.
      • remove

        public boolean remove​(int i)
        Deprecated.
        Remove an integer from the set without boxing.
        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​(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
      • 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
      • 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
      • 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
      • intStream

        public 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​(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
      • intSpliterator

        public 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​(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