Class AbstractMapEntryDecorator
- java.lang.Object
-
- org.apache.commons.collections.keyvalue.AbstractMapEntryDecorator
-
- All Implemented Interfaces:
java.util.Map.Entry,KeyValue
- Direct Known Subclasses:
AbstractDualBidiMap.MapEntry,AbstractInputCheckedMapDecorator.MapEntry,UnmodifiableEntrySet.UnmodifiableEntry
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 aMap.Entry.- Since:
- Commons Collections 3.0
- Version:
- $Revision: 646777 $ $Date: 2008-04-10 14:33:15 +0200 (Thu, 10 Apr 2008) $
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map.EntryentryTheMap.Entryto decorate
-
Constructor Summary
Constructors Constructor Description AbstractMapEntryDecorator(java.util.Map.Entry entry)Constructor that wraps (not copies).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object object)java.lang.ObjectgetKey()Gets the key from the pair.protected java.util.Map.EntrygetMapEntry()Gets the map being decorated.java.lang.ObjectgetValue()Gets the value from the pair.inthashCode()java.lang.ObjectsetValue(java.lang.Object object)java.lang.StringtoString()
-
-
-
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:KeyValueGets the key from the pair.
-
getValue
public java.lang.Object getValue()
Description copied from interface:KeyValueGets the value from the pair.
-
setValue
public java.lang.Object setValue(java.lang.Object object)
- Specified by:
setValuein interfacejava.util.Map.Entry
-
equals
public boolean equals(java.lang.Object object)
- Specified by:
equalsin interfacejava.util.Map.Entry- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejava.util.Map.Entry- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-