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

static class Multisets.ImmutableEntry<E> extends Multisets.AbstractEntry<E> implements Serializable
  • Field Details

    • element

      private final E 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

      public final E 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 interface Multiset.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 interface Multiset.Entry<E>
      Returns:
      the count of the element; never negative
    • nextInBucket

      @CheckForNull public Multisets.ImmutableEntry<E> nextInBucket()