Interface MutableSet<E>

    • Method Detail

      • immutable

        ImSet<E> immutable()
        Returns an immutable version of this immutable set.
      • put

        MutableSet<E> put​(E val)
        Adds an element. If the element already exists in this set, the new value overwrites the old one. If the new element is the same as an old element (based on the address of that item in memory, not an equals test), the old set may be returned unchanged.
        Specified by:
        put in interface BaseSet<E>
        Parameters:
        val - the element to add to this set
        Returns:
        a new set with the element added (see note above about adding duplicate elements).
      • union

        default MutableSet<E> union​(java.lang.Iterable<? extends E> iter)
        Returns a new set containing all the items.
        Specified by:
        union in interface BaseSet<E>