com.google.inject.internal
Class AbstractMapEntry<K,V>

java.lang.Object
  extended by com.google.inject.internal.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 object)
          Indicates whether an object equals this entry, following the behavior specified in Map.Entry.equals(java.lang.Object).
abstract  K getKey()
           
abstract  V getValue()
           
 int hashCode()
          Return this entry's hash code, following the behavior specified in Map.Entry.hashCode().
 V setValue(V value)
          
 String toString()
          Returns a string representation of the form {key}={value}.
 
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(@Nullable
                      Object object)
Indicates whether an object equals this entry, following the behavior specified in Map.Entry.equals(java.lang.Object).

Specified by:
equals in interface Map.Entry<K,V>
Overrides:
equals in class Object

hashCode

public int hashCode()
Return this entry's hash code, following the behavior specified in Map.Entry.hashCode().

Specified by:
hashCode in interface Map.Entry<K,V>
Overrides:
hashCode in class Object

toString

public String toString()
Returns a string representation of the form {key}={value}.

Overrides:
toString in class Object


Copyright © 2006-2011 Google, Inc.. All Rights Reserved.