public Set entrySet ( ) throws ObjectManagerException { return new AbstractSetView ( ) { public long size ( ) { return size ; } public boolean contains ( Object object ) throws ObjectManagerException { if ( object instanceof Map . Entry ) { Map . Entry entry = ( Map . Entry ) object ; Object v1 = get ( entry . getKey ( ) ) , v2 = entry . getValue ( ) ; return v1 == null ? v2 == null : v1 . equals ( v2 ) ; } return false ; } public Iterator iterator ( ) throws ObjectManagerException { return makeTreeMapIterator ( new AbstractMapEntry . Type ( ) { public Object get ( AbstractMapEntry entry ) { return entry ; } } ) ; } } ; }
Answers a Set of the mappings contained in this TreeMap . Each element in the set is a Map . Entry . The set is backed by this TreeMap so changes to one are relected by the other . The set does not support adding .