Class IntSet

All Implemented Interfaces:
Iterable<Integer>

public class IntSet extends ListBasedAbstractIntSet
A concrete set of integers.
  • Constructor Details

    • IntSet

      public IntSet()
      Creates an empty set.
  • Method Details

    • insert

      public void insert(int x)
      Description copied from class: AbstractIntSet
      Adds the given element to this set.

      This method modifies the object, that is: \( S' = S \cup \{ x \} \).

      Specified by:
      insert in class AbstractIntSet
      Parameters:
      x - the element to be added.