Package com.google.common.collect
Class Multisets.ImmutableEntry<E>
java.lang.Object
com.google.common.collect.Multisets.AbstractEntry<E>
com.google.common.collect.Multisets.ImmutableEntry<E>
- All Implemented Interfaces:
Multiset.Entry<E>
,Serializable
- Direct Known Subclasses:
RegularImmutableMultiset.NonTerminalEntry
- Enclosing class:
Multisets
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.google.common.collect.Multisets.AbstractEntry
equals, hashCode, toString
-
Field Details
-
element
-
count
private final int count -
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
ImmutableEntry
ImmutableEntry(E element, int count)
-
-
Method Details
-
getElement
Description copied from interface:Multiset.Entry
Returns the multiset element corresponding to this entry. Multiple calls to this method always return the same instance.- Specified by:
getElement
in interfaceMultiset.Entry<E>
- Returns:
- the element corresponding to this entry
-
getCount
public final int getCount()Description copied from interface:Multiset.Entry
Returns the count of the associated element in the underlying multiset. This count may either be an unchanging snapshot of the count at the time the entry was retrieved, or a live view of the current count of the element in the multiset, depending on the implementation. Note that in the former case, this method can never return zero, while in the latter, it will return zero if all occurrences of the element were since removed from the multiset.- Specified by:
getCount
in interfaceMultiset.Entry<E>
- Returns:
- the count of the element; never negative
-
nextInBucket
-