Package org.apache.commons.collections4

# Interface SortedMultiSet<E>

Type Parameters:
  `E` - The type held in the multiset

All Superinterfaces:
  `Collection<E>`, `Iterable<E>`, `MultiSet<E>`

All Known Implementing Classes:
  `AbstractSortedMultiSetDecorator`, `PredicatedSortedMultiSet`, `SynchronizedSortedMultiSet`, `TransformedSortedMultiSet`, `TreeMultiSet`, `UnmodifiableSortedMultiSet`

public interface SortedMultiSet<E> extends MultiSet<E>
Defines a type of `MultiSet` that maintains a sorted order among its unique representative members.

Since:
  4.6.0

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface org.apache.commons.collections4.MultiSet

  `MultiSet.Entry<E>`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Comparator<? super E>`
  `comparator()`
  Returns the comparator associated with this sorted multiset, or null if it uses its elements' natural ordering.
  `E`
  `first()`
  Returns the first (lowest) member.
  `E`
  `last()`
  Returns the last (highest) member.

  ### Methods inherited from interface java.util.Collection

  `addAll, clear, contains, isEmpty, parallelStream, removeIf, spliterator, stream, toArray, toArray`

  ### Methods inherited from interface java.lang.Iterable

  `forEach`

  ### Methods inherited from interface org.apache.commons.collections4.MultiSet

  `add, add, containsAll, entrySet, equals, getCount, hashCode, iterator, remove, remove, removeAll, retainAll, setCount, size, uniqueSet`

- ## Method Details

  - ### comparator

    Comparator<? super E> comparator()
    Returns the comparator associated with this sorted multiset, or null if it uses its elements' natural ordering.
    Returns:
      The comparator in use, or null if natural ordering.

  - ### first

    E first()
    Returns the first (lowest) member.
    Returns:
      The first element in the sorted multiset.

  - ### last

    E last()
    Returns the last (highest) member.
    Returns:
      The last element in the sorted multiset.