org.apache.commons.collections.keyvalue

## Class AbstractMapEntryDecorator

- java.lang.Object
- - org.apache.commons.collections.keyvalue.AbstractMapEntryDecorator

- All Implemented Interfaces:
    Map.Entry, KeyValue
  Direct Known Subclasses:
    AbstractDualBidiMap.MapEntry

      public abstract class AbstractMapEntryDecorator
      extends Object
      implements Map.Entry, KeyValue

  Provides a base decorator that allows additional functionality to be added to a `Map.Entry`.
  Since:
    Commons Collections 3.0
  Version:
    $Revision: 646777 $ $Date: 2008-04-10 14:33:15 +0200 (Thu, 10 Apr 2008) $
  Author:
    Stephen Colebourne

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Map.Entry` | `entry` The `Map.Entry` to decorate

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractMapEntryDecorator(Map.Entry entry)` Constructor that wraps (not copies).

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object object)`
    `Object` | `getKey()` Gets the key from the pair.
    `protected Map.Entry` | `getMapEntry()` Gets the map being decorated.
    `Object` | `getValue()` Gets the value from the pair.
    `int` | `hashCode()`
    `Object` | `setValue(Object object)`
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### entry

          protected final Map.Entry entry

      The `Map.Entry` to decorate

  - ### Constructor Detail

    - #### AbstractMapEntryDecorator

          public AbstractMapEntryDecorator(Map.Entry entry)

      Constructor that wraps (not copies).
      Parameters:
        `entry` - the `Map.Entry` to decorate, must not be null
      Throws:
        `IllegalArgumentException` - if the collection is null

  - ### Method Detail

    - #### getMapEntry

          protected Map.Entry getMapEntry()

      Gets the map being decorated.
      Returns:
        the decorated map

    - #### getKey

          public Object getKey()

      Description copied from interface: `KeyValue`
      Gets the key from the pair.
      Specified by:
        `getKey` in interface `Map.Entry`
      Specified by:
        `getKey` in interface `KeyValue`
      Returns:
        the key

    - #### getValue

          public Object getValue()

      Description copied from interface: `KeyValue`
      Gets the value from the pair.
      Specified by:
        `getValue` in interface `Map.Entry`
      Specified by:
        `getValue` in interface `KeyValue`
      Returns:
        the value

    - #### setValue

          public Object setValue(Object object)

      Specified by:
        `setValue` in interface `Map.Entry`

    - #### equals

          public boolean equals(Object object)

      Specified by:
        `equals` in interface `Map.Entry`
      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Specified by:
        `hashCode` in interface `Map.Entry`
      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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