bb.util
Class Unmodifiables.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableEntry<K,V>

java.lang.Object
  extended by bb.util.Unmodifiables.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableEntry<K,V>
All Implemented Interfaces:
Map.Entry<K,V>
Enclosing class:
Unmodifiables.UnmodifiableMap.UnmodifiableEntrySet<K,V>

private static class Unmodifiables.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableEntry<K,V>
extends Object
implements Map.Entry<K,V>

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<? extends K,? extends V> e
           
 
Constructor Summary
Unmodifiables.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableEntry(Map.Entry<? extends K,? extends V> e)
           
 
Method Summary
 boolean equals(Object o)
           
 K getKey()
           
 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
 

Field Detail

e

private Map.Entry<? extends K,? extends V> e
Constructor Detail

Unmodifiables.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableEntry

Unmodifiables.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableEntry(Map.Entry<? extends K,? extends V> e)
Method Detail

getKey

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

getValue

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

setValue

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

hashCode

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

equals

public boolean equals(Object o)
Specified by:
equals in interface Map.Entry<K,V>
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object