Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.collections.keyvalue
Class AbstractMapEntryDecorator

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

All Implemented Interfaces:
  java.util.Map.Entry, KeyValue

Direct Known Subclasses:
  AbstractDualBidiMap.MapEntry

    public abstract class AbstractMapEntryDecorator

extends java.lang.Object
implements java.util.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 13:33:15 +0100 (Thu, 10 Apr 2008) $
Author:
  Stephen Colebourne

Field Summary
`protected java.util.Map.Entry` | `entry` The `Map.Entry` to decorate

Constructor Summary
`AbstractMapEntryDecorator(java.util.Map.Entry entry)` Constructor that wraps (not copies).

Method Summary
`boolean` | `equals(java.lang.Object object)`
`java.lang.Object` | `getKey()` Gets the key from the pair.
`protected java.util.Map.Entry` | `getMapEntry()` Gets the map being decorated.
`java.lang.Object` | `getValue()` Gets the value from the pair.
`int` | `hashCode()`
`java.lang.Object` | `setValue(java.lang.Object object)`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### entry

    protected final java.util.Map.Entry entry

  The `Map.Entry` to decorate

Constructor Detail

### AbstractMapEntryDecorator

    public AbstractMapEntryDecorator(java.util.Map.Entry entry)

  Constructor that wraps (not copies).

  Parameters:
    `entry` - the `Map.Entry` to decorate, must not be null
  Throws:
    `java.lang.IllegalArgumentException` - if the collection is null

Method Detail

### getMapEntry

    protected java.util.Map.Entry getMapEntry()

  Gets the map being decorated.

  Returns:
    the decorated map

### getKey

    public java.lang.Object getKey()

  Description copied from interface: `KeyValue`
  Gets the key from the pair.

  Specified by:
    `getKey` in interface `java.util.Map.Entry`
  Specified by:
    `getKey` in interface `KeyValue`
  Returns:
    the key

### getValue

    public java.lang.Object getValue()

  Description copied from interface: `KeyValue`
  Gets the value from the pair.

  Specified by:
    `getValue` in interface `java.util.Map.Entry`
  Specified by:
    `getValue` in interface `KeyValue`
  Returns:
    the value

### setValue

    public java.lang.Object setValue(java.lang.Object object)

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

### equals

    public boolean equals(java.lang.Object object)

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

### hashCode

    public int hashCode()

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

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2008 The Apache Software Foundation. All Rights Reserved.