This is an updated version with enhancements made by Daniel Migowski, Andre Bogus, and David Koelle To convert to use Templates (Java 1.5+): - Change "implements Comparator" to "implements Comparator" - Change "compare(Object o1, Object o2)" to "compare(String s1, String s2)" - Remove the type checking and casting in compare(). To use this class: Use the static "sort" method from the java.util.Collections class: Collections.sort(your list, new AlphanumComparator());
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.