Just as the title says.
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.
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.
My current process is:
public void processData(Hashtable<String,GenericClass> htData)
Enumeration<String> enData = htData.keys();
String current = enData.nextElement();
* DO COMPLEX PROCESS
If you have a sorted list you can use
to get it back to an enumeration... if I'm following you correctly..
You can do this...
List l = new ArrayList(ht.keySet()); Collections.sort(l)