com.google.common.collect
Class ForwardingMapEntry<K,V>
java.lang.Object
com.google.common.collect.ForwardingObject
com.google.common.collect.ForwardingMapEntry<K,V>
- All Implemented Interfaces:
- Map.Entry<K,V>
@GwtCompatible
public abstract class ForwardingMapEntry<K,V>
- extends ForwardingObject
- implements Map.Entry<K,V>
A map entry which forwards all its method calls to another map entry.
Subclasses should override one or more methods to modify the behavior of the
backing map entry as desired per the decorator pattern.
- Author:
- Mike Bostock
- See Also:
ForwardingObject
ForwardingMapEntry
public ForwardingMapEntry()
delegate
protected abstract Map.Entry<K,V> delegate()
- Description copied from class:
ForwardingObject
- Returns the backing delegate instance that methods are forwarded to.
Abstract subclasses generally override the
ForwardingObject method
with an abstract method that has a more specific return type, such as
ForwardingSet.delegate(). Concrete subclasses override this method to
supply the instance being decorated.
- Specified by:
delegate in class ForwardingObject
getKey
public K getKey()
- Specified by:
getKey in interface Map.Entry<K,V>
getValue
public V getValue()
- Specified by:
getValue in interface Map.Entry<K,V>
setValue
public V setValue(V value)
- Specified by:
setValue in interface Map.Entry<K,V>
equals
public boolean equals(@Nullable
Object object)
- Specified by:
equals in interface Map.Entry<K,V>- Overrides:
equals in class Object
hashCode
public int hashCode()
- Specified by:
hashCode in interface Map.Entry<K,V>- Overrides:
hashCode in class Object