title: Get an Enumeration (for the Keys) of a Map (HashMap) in Java?
body: <p>As far as I understand this, it seems that there is not a direct way of getting an <code>Enumeration</code> directly for the Keys of a <code>HashMap</code>. I can only get a <code>keySet()</code>. From that <code>Set</code>, I can get an <code>Iterator</code> but an <code>Iterator</code> seems to be something different than an <code>Enumeration</code>. </p>
  
  <p>What is the best and most performant way to directly get an <code>Enumeration</code> from the Keys of a <code>HashMap</code>?</p>
  
  <p>Background: I am implementing my own <a href="http://java.sun.com/javase/6/docs/api/java/util/ResourceBundle.html#getKeys" rel="noreferrer">ResourceBundle</a> (=><code>getKeys()</code> Method), and I have to provide/implement a method that returns the Enumeration of all Keys. But my implementation is based on a <code>HashMap</code> so I need to somehow figure out how to best convert betweens these two "Iterator/Enumerator" techniques.</p>