Interface ImSet<E>

    • Method Detail

      • mutable

        MutSet<E> mutable()
        Returns a mutable version of this immutable set.
      • put

        @NotNull
        @NotNull ImSet<E> put​(E e)
        Adds an element, returning a modified version of the set (leaving the original set unchanged). 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 is returned unchanged.
        Specified by:
        put in interface BaseSet<E>
        Parameters:
        e - the element to add to this set
        Returns:
        a new set with the element added (see note above about adding duplicate elements).
      • union

        @NotNull
        default @NotNull ImSet<E> union​(@Nullable
                                        @Nullable Iterable<? extends E> iter)
        Description copied from interface: BaseSet
        Returns a new set containing all the items.
        Specified by:
        union in interface BaseSet<E>
      • without

        @NotNull
        @NotNull ImSet<E> without​(E key)
        Removes this key from the set
        Specified by:
        without in interface BaseSet<E>