Top Description Fields Constructors Methods
com.google.common.collect

pack-priv final Class DescendingImmutableSortedMultiset<E>

extends ImmutableSortedMultiset<E>
Class Inheritance
Annotations
@SuppressWarnings:serial
@GwtIncompatible
@ElementTypesAreNonnullByDefault
Imports
com.google.common.annotations.GwtIncompatible, .J2ktIncompatible, javax.annotation.CheckForNull

A descending wrapper around an ImmutableSortedMultiset
Author
Louis Wasserman

Field Summary

Modifier and TypeField and Description
private final transient ImmutableSortedMultiset<E>
Inherited from com.google.common.collect.ImmutableSortedMultiset:
descendingMultiset

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public int
count(Object
the element to count occurrences of
element
)

Implements com.google.common.collect.Multiset.count.

Returns the number of occurrences of an element in this multiset (the count of the element).
public ImmutableSortedMultiset<E>
public ImmutableSortedSet<E>
public Multiset.Entry<E>
firstEntry()

Implements com.google.common.collect.SortedMultiset.firstEntry.

Returns the entry of the first element in this multiset, or null if this multiset is empty.
pack-priv Multiset.Entry<E>
public ImmutableSortedMultiset<E>
headMultiset(E upperBound, BoundType boundType)

Implements abstract com.google.common.collect.ImmutableSortedMultiset.headMultiset.

Implements com.google.common.collect.SortedMultiset.headMultiset.

Returns a view of this multiset restricted to the elements less than upperBound, optionally including upperBound itself.
pack-priv boolean
isPartialView()

Implements abstract com.google.common.collect.ImmutableCollection.isPartialView.

Returns true if this immutable collection's implementation contains references to user-created objects that aren't accessible via this collection's methods.
public Multiset.Entry<E>
lastEntry()

Implements com.google.common.collect.SortedMultiset.lastEntry.

Returns the entry of the last element in this multiset, or null if this multiset is empty.
public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements com.google.common.collect.Multiset.size, java.util.Collection.size.

Returns the total number of all occurrences of all elements in this multiset.
public ImmutableSortedMultiset<E>
tailMultiset(E lowerBound, BoundType boundType)

Implements abstract com.google.common.collect.ImmutableSortedMultiset.tailMultiset.

Implements com.google.common.collect.SortedMultiset.tailMultiset.

Returns a view of this multiset restricted to the elements greater than lowerBound, optionally including lowerBound itself.
pack-priv Object
Inherited from com.google.common.collect.ImmutableSortedMultiset:
buildercomparatorcopyOfcopyOfcopyOfcopyOfcopyOfcopyOfcopyOfSortedemptyMultisetnaturalOrderofofofofofofofofofofofofoforderedBypollFirstEntrypollLastEntryreverseOrdersubMultisettoImmutableMultisettoImmutableMultisettoImmutableSortedMultisettoImmutableSortedMultiset

Field Detail

forwardback to summary
private final transient ImmutableSortedMultiset<E> forward

Constructor Detail

DescendingImmutableSortedMultisetback to summary
pack-priv DescendingImmutableSortedMultiset(ImmutableSortedMultiset<E> forward)

Method Detail

countback to summary
public int count(Object element)

Implements com.google.common.collect.Multiset.count.

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

Returns the number of occurrences of an element in this multiset (the count of the element). Note that for an Object#equals-based multiset, this gives the same result as Collections#frequency (which would presumably perform more poorly).

Note

the utility method Iterables#frequency generalizes this operation; it correctly delegates to this method when dealing with a multiset, but it can also accept any other iterable type.

Parameters
element:Object

the element to count occurrences of

Returns:int

the number of occurrences of the element in this multiset; possibly zero but never negative

Annotations
@Override
descendingMultisetback to summary
public ImmutableSortedMultiset<E> descendingMultiset()

Overrides com.google.common.collect.ImmutableSortedMultiset.descendingMultiset.

Implements com.google.common.collect.SortedMultiset.descendingMultiset.

Doc from com.google.common.collect.SortedMultiset.descendingMultiset.

Returns a descending view of this multiset. Modifications made to either map will be reflected in the other.

Annotations
@Override
elementSetback to summary
public ImmutableSortedSet<E> elementSet()

Implements abstract com.google.common.collect.ImmutableSortedMultiset.elementSet.

Implements com.google.common.collect.SortedMultiset.elementSet, com.google.common.collect.Multiset.elementSet.

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

Returns a NavigableSet view of the distinct elements in this multiset.

Returns:ImmutableSortedSet<E>

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

a view of the set of distinct elements in this multiset

Annotations
@Override
firstEntryback to summary
public Multiset.Entry<E> firstEntry()

Implements com.google.common.collect.SortedMultiset.firstEntry.

Doc from com.google.common.collect.SortedMultiset.firstEntry.

Returns the entry of the first element in this multiset, or null if this multiset is empty.

Annotations
@Override
@CheckForNull
getEntryback to summary
pack-priv Multiset.Entry<E> getEntry(int index)

Implements abstract com.google.common.collect.ImmutableMultiset.getEntry.

Annotations
@Override
headMultisetback to summary
public ImmutableSortedMultiset<E> headMultiset(E upperBound, BoundType boundType)

Implements abstract com.google.common.collect.ImmutableSortedMultiset.headMultiset.

Implements com.google.common.collect.SortedMultiset.headMultiset.

Doc from com.google.common.collect.SortedMultiset.headMultiset.

Returns a view of this multiset restricted to the elements less than upperBound, optionally including upperBound itself. The returned multiset is a view of this multiset, so changes to one will be reflected in the other. The returned multiset supports all operations that this multiset supports.

The returned multiset will throw an IllegalArgumentException on attempts to add elements outside its range.

Annotations
@Override
isPartialViewback to summary
pack-priv boolean isPartialView()

Implements abstract com.google.common.collect.ImmutableCollection.isPartialView.

Doc from com.google.common.collect.ImmutableCollection.isPartialView.

Returns true if this immutable collection's implementation contains references to user-created objects that aren't accessible via this collection's methods. This is generally used to determine whether copyOf implementations should make an explicit copy to avoid memory leaks.

Annotations
@Override
lastEntryback to summary
public Multiset.Entry<E> lastEntry()

Implements com.google.common.collect.SortedMultiset.lastEntry.

Doc from com.google.common.collect.SortedMultiset.lastEntry.

Returns the entry of the last element in this multiset, or null if this multiset is empty.

Annotations
@Override
@CheckForNull
sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements com.google.common.collect.Multiset.size, java.util.Collection.size.

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

Returns the total number of all occurrences of all elements in this multiset.

Note

this method does not return the number of distinct elements in the multiset, which is given by entrySet().size().

Returns:int

Doc from java.util.Collection.size.

the number of elements in this collection

Annotations
@Override
tailMultisetback to summary
public ImmutableSortedMultiset<E> tailMultiset(E lowerBound, BoundType boundType)

Implements abstract com.google.common.collect.ImmutableSortedMultiset.tailMultiset.

Implements com.google.common.collect.SortedMultiset.tailMultiset.

Doc from com.google.common.collect.SortedMultiset.tailMultiset.

Returns a view of this multiset restricted to the elements greater than lowerBound, optionally including lowerBound itself. The returned multiset is a view of this multiset, so changes to one will be reflected in the other. The returned multiset supports all operations that this multiset supports.

The returned multiset will throw an IllegalArgumentException on attempts to add elements outside its range.

Annotations
@Override
writeReplaceback to summary
pack-priv Object writeReplace()

Overrides com.google.common.collect.ImmutableSortedMultiset.writeReplace.

Annotations
@SuppressWarnings:RedundantOverride
@Override
@J2ktIncompatible