public class AlphanumComparator extends Object implements Comparator<String>
To convert to use Templates (Java 1.5+):
- Change "implements Comparator" to "implements Comparator
To use this class:
Use the static "sort" method from the java.util.Collections class:
Collections.sort(your list, new AlphanumComparator());
| Constructor and Description |
|---|
AlphanumComparator() |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(String o1,
String o2) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic int compare(String o1, String o2)
compare in interface Comparator<String>Copyright © 2018 OpenEstate. All rights reserved.