Type Parameters:
E - the type of elements maintained by this set
All Superinterfaces:
Collection<E>, Iterable<E>, SequencedCollection<E>, SequencedSet<E>, Set<E>
All Known Subinterfaces:
NavigableSet<E>
All Known Implementing Classes:
ConcurrentSkipListSet, TreeSet

  • Method Summary

    default void

    addFirst(E e)

    Throws UnsupportedOperationException.

    default void

    addLast(E e)

    Throws UnsupportedOperationException.

    Returns the comparator used to order the elements in this set, or null if this set uses the natural ordering of its elements.

    first()

    Returns the first (lowest) element currently in this set.

    default E

    getFirst()

    Gets the first element of this collection.

    default E

    getLast()

    Gets the last element of this collection.

    headSet(E toElement)

    Returns a view of the portion of this set whose elements are strictly less than toElement.

    last()

    Returns the last (highest) element currently in this set.

    default E

    Removes and returns the first element of this collection (optional operation).

    default E

    Removes and returns the last element of this collection (optional operation).

    reversed()

    Returns a reverse-ordered view of this collection.

    Creates a Spliterator over the elements in this sorted set.

    subSet(E fromElement, E toElement)

    Returns a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive.

    tailSet(E fromElement)

    Returns a view of the portion of this set whose elements are greater than or equal to fromElement.

  • Method Details

    • comparator

    • subSet

    • headSet

    • tailSet

    • first

    • last

    • spliterator

    • addFirst

    • addLast

    • getFirst

    • getLast

    • removeFirst

    • removeLast

    • reversed