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
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 TypeMethodDescriptionComparator<? super E> Returns the comparator associated with this sorted multiset, or null if it uses its elements' natural ordering.first()Returns the first (lowest) member.last()Returns the last (highest) member.Methods inherited from interface java.util.Collection
addAll, clear, contains, isEmpty, parallelStream, removeIf, spliterator, stream, toArray, toArray
-
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
Returns the first (lowest) member.- Returns:
- The first element in the sorted multiset.
-
last
Returns the last (highest) member.- Returns:
- The last element in the sorted multiset.
-