|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.common.collect.ForwardingMapEntry<K,V>
public abstract class ForwardingMapEntry<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.
Unlike most Forwarding classes, this class does not implement
Serializable, since it usually decorates a map entry that shouldn't
be serialized.
ForwardingObject| Constructor Summary | |
|---|---|
protected |
ForwardingMapEntry(java.util.Map.Entry<K,V> delegate)
Constructs a forwarding map entry that forwards to the provided delegate. |
| Method Summary | |
|---|---|
protected java.util.Map.Entry<K,V> |
delegate()
Returns the backing delegate object. |
boolean |
equals(java.lang.Object obj)
|
K |
getKey()
|
V |
getValue()
|
int |
hashCode()
|
V |
setValue(V value)
|
java.lang.String |
toString()
Returns the string representation generated by the delegate's toString method. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected ForwardingMapEntry(java.util.Map.Entry<K,V> delegate)
| Method Detail |
|---|
protected java.util.Map.Entry<K,V> delegate()
@SuppressWarnings("unchecked")
@Override protected Foo delegate() {
return (Foo) super.delegate();
}
This method should always return the same delegate instance that was passed
to the constructor.
public K getKey()
getKey in interface java.util.Map.Entry<K,V>public V getValue()
getValue in interface java.util.Map.Entry<K,V>public V setValue(V value)
setValue in interface java.util.Map.Entry<K,V>public boolean equals(java.lang.Object obj)
equals in interface java.util.Map.Entry<K,V>equals in class java.lang.Objectpublic int hashCode()
hashCode in interface java.util.Map.Entry<K,V>hashCode in class java.lang.Objectpublic java.lang.String toString()
toString method.
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||