Class IntIterableBitSet

    • Constructor Detail

      • IntIterableBitSet

        public IntIterableBitSet()
        Creates an IntIterable object relying on an offseted bitset implementation.
    • Method Detail

      • setOffset

        public void setOffset​(int offset)
        Creates an IntIterable object relying on a bitset implementation. For memory consumption purpose, an offset is needed to indicate the lowest value stored in this set.
        Parameters:
        offset - lowest value to be stored in this set
      • addAll

        public boolean addAll​(int... values)
        Description copied from interface: IntIterableSet
        Adds all of the elements in the array to this set.
        Specified by:
        addAll in interface IntIterableSet
        Parameters:
        values - array containing elements to be added to this set
        Returns:
        true if this set changed as a result of the call
      • addAll

        public boolean addAll​(IntIterableSet set)
        Description copied from interface: IntIterableSet
        Adds all of the elements in the specified set to this set.
        Specified by:
        addAll in interface IntIterableSet
        Parameters:
        set - set containing elements to be added to this set
        Returns:
        true if this set changed as a result of the call
      • retainAll

        public boolean retainAll​(IntIterableSet set)
        Description copied from interface: IntIterableSet
        Retains only the elements in this set that are contained in the specified set. In other words, removes from this set all of its elements that are not contained in the specified set.
        Specified by:
        retainAll in interface IntIterableSet
        Parameters:
        set - set containing elements to be retained in this set
        Returns:
        true if this set changed as a result of the call
      • removeAll

        public boolean removeAll​(IntIterableSet set)
        Description copied from interface: IntIterableSet
        Removes all of this set's elements that are also contained in the specified set. After this call returns, this set will contain no elements in common with the specified set.
        Specified by:
        removeAll in interface IntIterableSet
        Parameters:
        set - set containing elements to be removed from this set
        Returns:
        true if this set changed as a result of the call
      • removeBetween

        public boolean removeBetween​(int f,
                                     int t)
        Description copied from interface: IntIterableSet
        Removes all values between f (inclusive) and t (inclusive)
        Specified by:
        removeBetween in interface IntIterableSet
        Parameters:
        f - first value to remove
        t - last value to remove
        Returns:
        true if this set changed as a result of the call
      • nextValueOut

        public int nextValueOut​(int aValue)
        Specified by:
        nextValueOut in interface IntIterableSet
        Parameters:
        aValue - (exclusive)
        Returns:
        the value outside thisn after 'aValue'
      • previousValueOut

        public int previousValueOut​(int aValue)
        Specified by:
        previousValueOut in interface IntIterableSet
        Parameters:
        aValue - (exclusive)
        Returns:
        the value outside this, before'aValue'
      • plus

        public void plus​(int x)
        Description copied from interface: IntIterableSet
        add the value x to all integers stored in this set
        Specified by:
        plus in interface IntIterableSet
        Parameters:
        x - value to add
      • minus

        public void minus​(int x)
        Description copied from interface: IntIterableSet
        subtract the value x to all integers stored in this set
        Specified by:
        minus in interface IntIterableSet
        Parameters:
        x - value to add