Home » openjdk-7 » java » util » [javadoc | source]
java.util
static class: Collections.UnmodifiableMap.UnmodifiableEntrySet [javadoc | source]
java.lang.Object
   java.util.Collections.UnmodifiableCollection<E>
      java.util.Collections.UnmodifiableSet<K, V>
         java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet

All Implemented Interfaces:
    Set, Serializable, Collection

We need this class in addition to UnmodifiableSet as Map.Entries themselves permit modification of the backing Map via their setValue operation. This class is subtle: there are many possible attacks that must be thwarted.
Fields inherited from java.util.Collections$UnmodifiableCollection:
c
Constructor:
 UnmodifiableEntrySet(Set<Entry> s) 
Method from java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet Summary:
contains,   containsAll,   equals,   iterator,   toArray,   toArray
Methods from java.util.Collections$UnmodifiableSet:
equals,   hashCode
Methods from java.util.Collections$UnmodifiableCollection:
add,   addAll,   clear,   contains,   containsAll,   isEmpty,   iterator,   remove,   removeAll,   retainAll,   size,   toArray,   toArray,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet Detail:
 public boolean contains(Object o) 
    This method is overridden to protect the backing set against an object with a nefarious equals function that senses that the equality-candidate is Map.Entry and calls its setValue method.
 public boolean containsAll(Collection<?> coll) 
    The next two methods are overridden to protect against an unscrupulous List whose contains(Object o) method senses when o is a Map.Entry, and calls o.setValue.
 public boolean equals(Object o) 
 public Iterator<K, V> iterator() 
 public Object[] toArray() 
 public T[] toArray(T[] a)