java.util
Class Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableEntry

java.lang.Object
  |
  +--java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableEntry

private static class Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableEntry
extends Object
implements Map.Entry

This "wrapper class" serves two purposes: it prevents the client from modifying the backing Map, by short-circuiting the setValue method, and it protects the backing Map against an ill-behaved Map.Entry that attempts to modify another Map Entry when asked to perform an equality check.


Field Summary
private  Map.Entry e
           
 
Constructor Summary
(package private) Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableEntry(Map.Entry e)
           
 
Method Summary
 boolean equals(Object o)
           
 Object getKey()
           
 Object getValue()
           
 int hashCode()
           
 Object setValue(Object value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

e

private Map.Entry e
Constructor Detail

Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableEntry

Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableEntry(Map.Entry e)
Method Detail

getKey

public Object getKey()
Specified by:
getKey in interface Map.Entry

getValue

public Object getValue()
Specified by:
getValue in interface Map.Entry

setValue

public Object setValue(Object value)
Specified by:
setValue in interface Map.Entry

hashCode

public int hashCode()
Specified by:
hashCode in interface Map.Entry
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Specified by:
equals in interface Map.Entry
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object