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 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()
-
-
-
Field Detail
-
entry
protected final Map.Entry entry
TheMap.Entry
to decorate
-
-
Constructor Detail
-
AbstractMapEntryDecorator
public AbstractMapEntryDecorator(Map.Entry entry)
Constructor that wraps (not copies).- Parameters:
entry
- theMap.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.
-
getValue
public Object getValue()
Description copied from interface:KeyValue
Gets the value from the pair.
-
equals
public boolean equals(Object object)
-
hashCode
public int hashCode()
-
-