- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 13 Oct 2009 15:08:58 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/util In directory hutz:/tmp/cvs-serv3168/src/org/w3c/unicorn/util Modified Files: UCNProperties.java Log Message: keys are now sorted alphabetically Index: UCNProperties.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/util/UCNProperties.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- UCNProperties.java 6 Oct 2009 08:17:25 -0000 1.5 +++ UCNProperties.java 13 Oct 2009 15:08:56 -0000 1.6 @@ -1,6 +1,9 @@ package org.w3c.unicorn.util; +import java.util.Collections; +import java.util.Enumeration; import java.util.Properties; +import java.util.Vector; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -48,6 +51,16 @@ } } + @SuppressWarnings("unchecked") + public Enumeration keys() { + Enumeration keysEnum = super.keys(); + Vector<String> keyList = new Vector<String>(); + while(keysEnum.hasMoreElements()) + keyList.add((String)keysEnum.nextElement()); + Collections.sort(keyList); + return keyList.elements(); + } + @Override public String toString() { String result = "";
Received on Tuesday, 13 October 2009 15:09:02 UTC