All Known Implementing Classes:
DenseIntSet16Bit, DenseIntSet8Bit, GrowableIntSet8Bit

public interface IntSet
Interface for a collection of int-valued elements that contains no duplicates.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    addAsInt(int e)
    Adds the specified element to the set if it is not already present.
    void
    Clears the set.
    boolean
    Checks if this set contains the specified element.
    boolean
    removeAsInt(int e)
    Removes the specified element from the set.
  • Method Details

    • addAsInt

      boolean addAsInt(int e)
      Adds the specified element to the set if it is not already present.
      Parameters:
      e - element to be added to the set
      Returns:
      true if this set did not already contain the specified element
    • removeAsInt

      boolean removeAsInt(int e)
      Removes the specified element from the set.
      Parameters:
      e - an element
      Returns:
      true if this set contained the element
    • containsAsInt

      boolean containsAsInt(int e)
      Checks if this set contains the specified element.
      Parameters:
      e - an element
      Returns:
      true if this set contains the element.
    • clear

      void clear()
      Clears the set.