com.google.common.collect
Class AbstractMapEntry<K,V>

java.lang.Object
  extended by com.google.common.collect.AbstractMapEntry<K,V>
All Implemented Interfaces:
Map.Entry<K,V>

public abstract class AbstractMapEntry<K,V>
extends Object
implements Map.Entry<K,V>

Implementation of the equals, hashCode, and toString methods of Entry.

Author:
Jared Levy

Constructor Summary
AbstractMapEntry()
           
 
Method Summary
 boolean equals(Object o)
           
abstract  K getKey()
           
abstract  V getValue()
           
 int hashCode()
           
 V setValue(V value)
          
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractMapEntry

public AbstractMapEntry()
Method Detail

getKey

public abstract K getKey()
Specified by:
getKey in interface Map.Entry<K,V>

getValue

public abstract V getValue()
Specified by:
getValue in interface Map.Entry<K,V>

setValue

public V setValue(V value)

This implementation throws an UnsupportedOperationException. Override this method to support mutable map entries.

Specified by:
setValue in interface Map.Entry<K,V>

equals

public boolean equals(Object o)
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

toString

public String toString()
Overrides:
toString in class Object