@ Override public Set keySet ( ) { if ( keySet != null ) { return keySet ; } keySet = new AbstractSet ( ) { @ Override public Iterator iterator ( ) { return new KeyIterator ( ) ; } @ Override public int size ( ) { return size ; } @ Override public boolean contains ( final Object o ) { return containsKey ( o ) ; } @ Override public boolean remove ( final Object o ) { final Object r = ReferenceMap . this . remove ( o ) ; return r != null ; } @ Override public void clear ( ) { ReferenceMap . this . clear ( ) ; } } ; return keySet ; }
Returns a set view of this map s keys .