public Set < String > keySet ( ) { HashSet < String > set = new HashSet < String > ( ) ; Iterator < String > keys = keys ( ) ; while ( keys . hasNext ( ) ) { set . add ( keys . next ( ) ) ; } return set ; }
Returns a set containing all keys on this object . If possible use the keys iterator instead for improved performance .