com.google.common.collect
Class AbstractMultisetEntry<E>

java.lang.Object
  extended by com.google.common.collect.AbstractMultisetEntry<E>
All Implemented Interfaces:
Multiset.Entry<E>

public abstract class AbstractMultisetEntry<E>
extends java.lang.Object
implements Multiset.Entry<E>

Implementation of the equals, hashCode, and toString methods of Multiset.Entry.

Author:
Mike Bostock

Constructor Summary
AbstractMultisetEntry()
           
 
Method Summary
 boolean equals(java.lang.Object o)
          Indicates whether an object equals this entry, following the behavior specified in Multiset.Entry.equals(java.lang.Object).
 int hashCode()
          Return this entry's hash code, following the behavior specified in Multiset.Entry.hashCode().
 java.lang.String toString()
          Returns a string representation of this multiset entry.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.common.collect.Multiset.Entry
getCount, getElement
 

Constructor Detail

AbstractMultisetEntry

public AbstractMultisetEntry()
Method Detail

equals

public boolean equals(java.lang.Object o)
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 java.lang.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 java.lang.Object

toString

public java.lang.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 java.lang.Object


Copyright © 2008 Google. All Rights Reserved.