title: Is there a simple way to alphabetize a String Enumeration in Java?
body: <p>Just as the title says.</p>
  
  <p>I tried messing around a bit with Collections.sort() on a List[] and the .sort() function of an ArrayList but I was never able to parse it back to an Enumeration.</p>
  
  <p>Thanks!</p>
  
  <p>EDIT:</p>
  
  <p>Here's some pseduocode and further explanation. My goal is to take the keys() from a Hashtable and do complex operations involving each one, alphabetically.</p>
  
  <p>My current process is:</p>
  
  <ol>
  <li>Take a hash table I'm given</li>
  <li>Form an enumeration from the ht</li>
  <li>Run a while loop until the enumeration is empty</li>
  </ol>
  
  <p>So the code is like this:</p>
  
  <pre><code>public void processData(Hashtable&lt;String,GenericClass&gt; htData)
  {
      Enumeration&lt;String&gt; enData = htData.keys();
  
      while(enData.hasMoreElements())
      {
          String current = enData.nextElement();
  
          /*
           * DO COMPLEX PROCESS
           */
      }
  }
  </code></pre>
  
  <p>The problem, is that the data in the enumeration has to be alphabetical (that is, the "complex process" must be done on each key in alphabetical order). Any solutions? Thanks!</p>