Class AbstractMapEntryDecorator<K,V>
- java.lang.Object
-
- org.apache.commons.collections4.keyvalue.AbstractMapEntryDecorator<K,V>
-
- Direct Known Subclasses:
AbstractDualBidiMap.MapEntry
public abstract class AbstractMapEntryDecorator<K,V> extends Object implements Map.Entry<K,V>, KeyValue<K,V>
Provides a base decorator that allows additional functionality to be added to aMap.Entry
.- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description AbstractMapEntryDecorator(Map.Entry<K,V> entry)
Constructor that wraps (not copies).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
K
getKey()
Gets the key from the pair.protected Map.Entry<K,V>
getMapEntry()
Gets the map being decorated.V
getValue()
Gets the value from the pair.int
hashCode()
V
setValue(V object)
String
toString()
-
-
-
Constructor Detail
-
AbstractMapEntryDecorator
public AbstractMapEntryDecorator(Map.Entry<K,V> entry)
Constructor that wraps (not copies).- Parameters:
entry
- theMap.Entry
to decorate, must not be null- Throws:
NullPointerException
- if the collection is null
-
-
Method Detail
-
getMapEntry
protected Map.Entry<K,V> getMapEntry()
Gets the map being decorated.- Returns:
- the decorated map
-
getValue
public V getValue()
Description copied from interface:KeyValue
Gets the value from the pair.
-
equals
public boolean equals(Object object)
-
hashCode
public int hashCode()
-
-