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.
e
private Map.Entry e
Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableEntry
Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableEntry(Map.Entry e)
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