• interface Set (T): SetView!(T), Dispenser!(T);
  • MutableSets support an include operations to add an element only if it not present.

    author:
    Doug Lea @version 0.93

    For an introduction to this package see Overview .

  • void add (T element);
  • Include the indicated element in the collection. No effect if the element is already present. @param element the element to add

    Returns:


    condition:
     has(element) &&
     no spurious effects &&
     Version change iff !PREV(this).has(element)
     


    Throws:
    IllegalElementException if !canInclude(element)

  • void add (Iterator!(T) e);
  • Include all elements of the enumeration in the collection. Behaviorally equivalent to
     while (e.more()) include(e.get());
     
    @param e the elements to include


    Throws:
    IllegalElementException if !canInclude(element)

    Throws:
    CorruptedIteratorException propagated if thrown

    :: page rendered by CandyDoc