Class AbstractMapEntryDecorator<K,V>
- java.lang.Object
-
- org.apache.commons.collections4.keyvalue.AbstractMapEntryDecorator<K,V>
-
- Type Parameters:
K- the type of keysV- the type of mapped values
- 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 booleanequals(Object object)KgetKey()Gets the key from the pair.protected Map.Entry<K,V>getMapEntry()Gets the map being decorated.VgetValue()Gets the value from the pair.inthashCode()VsetValue(V object)StringtoString()
-
-
-
Constructor Detail
-
AbstractMapEntryDecorator
public AbstractMapEntryDecorator(Map.Entry<K,V> entry)
Constructor that wraps (not copies).- Parameters:
entry- theMap.Entryto 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:KeyValueGets the value from the pair.
-
equals
public boolean equals(Object object)
-
hashCode
public int hashCode()
-
-