SortedMultiset to introduce a bridge method for elementSet(),
to ensure binary compatibility with older Guava versions that specified elementSet() to
return SortedSet.
| Modifier and Type | Method and Description |
|---|---|
| public SortedSet | elementSet()
Redeclares com. |
| elementSet | back to summary |
|---|---|
| public SortedSet Redeclares com. Doc from com. Returns the set of distinct elements contained in this multiset. The element set is backed by the same data as the multiset, so any change to either is immediately reflected in the other. The order of the elements in the element set is unspecified. 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:
| |