Interface ImSortedSet<E>

    • Method Detail

      • put

        @NotNull
        @NotNull ImSortedSet<E> put​(E e)
        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:
        e - the element to add to this set
        Returns:
        a new set with the element added (see note above about adding duplicate elements).
      • without

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

        @NotNull
        @NotNull ImSortedSet<E> subSet​(E fromElement,
                                       E toElement)
        Return the elements in this set from the start element (inclusive) to the end element (exclusive)
        Specified by:
        subSet in interface SortedSet<E>
        Specified by:
        subSet in interface UnmodSortedSet<E>
      • union

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