org.apache.commons.collections4.multiset

## Class AbstractMultiSet.AbstractEntry<E>

- java.lang.Object
- - org.apache.commons.collections4.multiset.AbstractMultiSet.AbstractEntry<E>

- 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.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractMultiSet.AbstractEntry()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object object)` Compares the specified object with this entry for equality.
    `int` | `hashCode()` Returns the hash code value for this multiset entry.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.commons.collections4.MultiSet.Entry

      `getCount, getElement`

- - ### Constructor Detail

    - #### AbstractMultiSet.AbstractEntry

          protected AbstractMultiSet.AbstractEntry()

  - ### Method Detail

    - #### equals

          public boolean equals(Object object)

      Description copied from interface: `MultiSet.Entry`
      Compares 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 `e1` and `e2` represent the same mapping if

               (e1.getElement()==null ? e2.getElement()==null
                                      : e1.getElement().equals(e2.getElement())) &&
               (e1.getCount()==e2.getCount())

      Specified by:
        `equals` in interface `MultiSet.Entry<E>`
      Overrides:
        `equals` in class `Object`
      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

          public int hashCode()

      Description copied from interface: `MultiSet.Entry`
      Returns the hash code value for this multiset entry.

      The hash code of a multiset entry `e` is defined to be:

                (e==null ? 0 : e.hashCode()) ^ noOccurances)

      Specified by:
        `hashCode` in interface `MultiSet.Entry<E>`
      Overrides:
        `hashCode` in class `Object`
      Returns:
        the hash code value for this multiset entry

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.