Class AbstractMultiSet.AbstractEntry<E>
java.lang.Object
org.apache.commons.collections4.multiset.AbstractMultiSet.AbstractEntry<E>
- Type Parameters:
E- the element type.
- All Implemented Interfaces:
MultiSet.Entry<E>
- Direct Known Subclasses:
AbstractMapMultiSet.MultiSetEntry
- Enclosing class:
AbstractMultiSet<E>
protected abstract static class AbstractMultiSet.AbstractEntry<E>
extends Object
implements MultiSet.Entry<E>
Inner class AbstractEntry.
- Since:
- 4.1
-
Constructor Details
-
AbstractEntry
public AbstractEntry()Constructs a new instance.
-
-
Method Details
-
equals
Description copied from interface:MultiSet.EntryCompares the specified object with this entry for equality. Returns true if the given object is also a multiset entry and the two entries represent the same element with the same number of occurrences.More formally, two entries
e1ande2represent the same mapping if(e1.getElement()==null ? e2.getElement()==null : e1.getElement().equals(e2.getElement())) && (e1.getCount()==e2.getCount())- Specified by:
equalsin interfaceMultiSet.Entry<E>- Overrides:
equalsin classObject- Parameters:
object- object to be compared for equality with this multiset entry- Returns:
- true if the specified object is equal to this multiset entry
-
hashCode
Description copied from interface:MultiSet.EntryReturns the hash code value for this multiset entry.The hash code of a multiset entry
eis defined to be:(e==null ? 0 : e.hashCode()) ^ noOccurrences)- Specified by:
hashCodein interfaceMultiSet.Entry<E>- Overrides:
hashCodein classObject- Returns:
- the hash code value for this multiset entry
-
toString
-