/**
* This file is distributed under the GPL
* $Id: SortedProperties.java 619 2007-08-28 14:57:28Z scotta $
*/
package net.bnubot.util;
import java.util.Collections;
import java.util.Enumeration;
import java.util.Properties;
import java.util.Vector;
public class SortedProperties extends Properties {
private static final long serialVersionUID = 213081373529965920L;
@SuppressWarnings("unchecked")
public synchronized Enumeration keys() {
Enumeration keysEnum = super.keys();
Vector keyList = new Vector();
while(keysEnum.hasMoreElements())
keyList.add(keysEnum.nextElement());
Collections.sort(keyList);
return keyList.elements();
}
}