interface SortedMultisetBridge<E> extends Multiset<E>
SortedMultiset
to introduce a bridge method for elementSet()
,
to ensure binary compatibility with older Guava versions that specified elementSet()
to
return SortedSet
.Multiset.Entry<E>
Modifier and Type | Method and Description |
---|---|
java.util.SortedSet<E> |
elementSet()
Returns the set of distinct elements contained in this multiset.
|
java.util.SortedSet<E> elementSet()
Multiset
If the element set supports any removal operations, these necessarily cause all occurrences of the removed element(s) to be removed from the multiset. Implementations are not expected to support the add operations, although this is possible.
A common use for the element set is to find the number of distinct elements in the multiset:
elementSet().size()
.
elementSet
in interface Multiset<E>