ccc.domain.sorting
Class AlphanumComparator
java.lang.Object
ccc.domain.sorting.AlphanumComparator
- All Implemented Interfaces:
- java.io.Serializable, java.util.Comparator<java.lang.String>
public class AlphanumComparator
- extends java.lang.Object
- implements java.util.Comparator<java.lang.String>, java.io.Serializable
This is an updated version with enhancements made by Daniel Migowski,
Andre Bogus, and David Koelle.
To use this class:
Use the static "sort" method from the java.util.Collections class:
Collections.sort(your list, new AlphanumComparator());
- Version:
- http://www.davekoelle.com/files/AlphanumComparator.java
on 08th August 2008.
- Author:
- Daniel Migowski, Andre Bogus, David Koelle, Civic Computing Ltd.
- See Also:
- Serialized Form
Method Summary |
int |
compare(java.lang.String o1,
java.lang.String o2)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
AlphanumComparator
public AlphanumComparator()
compare
public final int compare(java.lang.String o1,
java.lang.String o2)
-
- Specified by:
compare
in interface java.util.Comparator<java.lang.String>
Copyright © 2010. All Rights Reserved.