Class Multisets.AbstractEntry<E>

java.lang.Object
com.google.common.collect.Multisets.AbstractEntry<E>
All Implemented Interfaces:
Multiset.Entry<E>
Direct Known Subclasses:
Multisets.ImmutableEntry
Enclosing class:
Multisets

abstract static class Multisets.AbstractEntry<E> extends Object implements Multiset.Entry<E>
Implementation of the equals, hashCode, and toString methods of Multiset.Entry.
  • Constructor Details

    • AbstractEntry

      AbstractEntry()
  • Method Details

    • equals

      public boolean equals(@CheckForNull Object object)
      Indicates whether an object equals this entry, following the behavior specified in Multiset.Entry.equals(java.lang.Object).
      Specified by:
      equals in interface Multiset.Entry<E>
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Return this entry's hash code, following the behavior specified in Multiset.Entry.hashCode().
      Specified by:
      hashCode in interface Multiset.Entry<E>
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Returns a string representation of this multiset entry. The string representation consists of the associated element if the associated count is one, and otherwise the associated element followed by the characters " x " (space, x and space) followed by the count. Elements and counts are converted to strings as by String.valueOf.
      Specified by:
      toString in interface Multiset.Entry<E>
      Overrides:
      toString in class Object