Class AbstractMapEntryDecorator
- java.lang.Object
-
- org.apache.commons.collections.keyvalue.AbstractMapEntryDecorator
-
- 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 aMap.Entry.- Since:
- Commons Collections 3.0
- Version:
- $Revision: 646777 $ $Date: 2008-04-10 14:33:15 +0200 (Thu, 10 Apr 2008) $
- Author:
- Stephen Colebourne
-
-
Constructor Summary
Constructors Constructor Description AbstractMapEntryDecorator(Map.Entry entry)Constructor that wraps (not copies).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)ObjectgetKey()Gets the key from the pair.protected Map.EntrygetMapEntry()Gets the map being decorated.ObjectgetValue()Gets the value from the pair.inthashCode()ObjectsetValue(Object object)StringtoString()
-
-
-
Field Detail
-
entry
protected final Map.Entry entry
TheMap.Entryto decorate
-
-
Constructor Detail
-
AbstractMapEntryDecorator
public AbstractMapEntryDecorator(Map.Entry entry)
Constructor that wraps (not copies).- Parameters:
entry- theMap.Entryto 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:KeyValueGets the key from the pair.
-
getValue
public Object getValue()
Description copied from interface:KeyValueGets the value from the pair.
-
equals
public boolean equals(Object object)
-
hashCode
public int hashCode()
-
-