public Collection keyCollection ( ) { if ( keyCollection == null ) { keyCollection = new AbstractCollectionView ( ) { public long size ( ) throws ObjectManagerException { return AbstractTreeMap . this . size ( ) ; } public Iterator iterator ( ) throws ObjectManagerException { return makeTreeMapIterator ( new AbstractMapEntry . Type ( ) { public Object get ( AbstractMapEntry entry ) { return entry . key ; } } ) ; } } ; } return keyCollection ; }
Answers a Collection of the keys contained in this TreeMap . The set is backed by this TreeMap so changes to one are relected by the other . The Collection does not support adding .