Top Description Methods
com.google.common.collect

pack-priv Interface SortedMultisetBridge<E extends @Nullable Object>

extends Multiset<E extends @Nullable Object>
Known Direct Subinterfaces
com.google.common.collect.SortedMultiset
Annotations
@GwtIncompatible
@ElementTypesAreNonnullByDefault
Imports
com.google.common.annotations.GwtIncompatible, java.util.SortedSet, org.checkerframework.checker.nullness.qual.Nullable

Superinterface of SortedMultiset to introduce a bridge method for elementSet(), to ensure binary compatibility with older Guava versions that specified elementSet() to return SortedSet.
Author
Louis Wasserman

Method Summary

Modifier and TypeMethod and Description
public SortedSet<E>
elementSet()

Redeclares com.google.common.collect.Multiset.elementSet.

Returns the set of distinct elements contained in this multiset.
Inherited from com.google.common.collect.Multiset:
addaddcontainscontainsAllcountentrySetequalsforEachforEachEntryhashCodeiteratorremoveremoveremoveAllretainAllsetCountsetCountsizespliteratortoString

Method Detail

elementSetback to summary
public SortedSet<E> elementSet()

Redeclares com.google.common.collect.Multiset.elementSet.

Doc from com.google.common.collect.Multiset.elementSet.

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().

Returns:SortedSet<E>

a view of the set of distinct elements in this multiset

Annotations
@Override