Interface SortedMultisetBridge<E>

All Superinterfaces:
Collection<E>, Iterable<E>, Multiset<E>
All Known Subinterfaces:
SortedMultiset<E>
All Known Implementing Classes:
AbstractSortedMultiset, DescendingImmutableSortedMultiset, DescendingMultiset, ForwardingSortedMultiset, ForwardingSortedMultiset.StandardDescendingMultiset, ImmutableSortedMultiset, RegularImmutableSortedMultiset, TreeMultiset, UnmodifiableSortedMultiset

interface SortedMultisetBridge<E> extends Multiset<E>
Superinterface of SortedMultiset to introduce a bridge method for elementSet(), to ensure binary compatibility with older Guava versions that specified elementSet() to return SortedSet.
  • Method Details

    • elementSet

      SortedSet<E> elementSet()
      Description copied from interface: Multiset
      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: elementSet().size().

      Specified by:
      elementSet in interface Multiset<E>
      Returns:
      a view of the set of distinct elements in this multiset