public final class FilenameComparator extends Object implements Comparator<String>
Desired semantic ordering:
version-1 version-2 version-10
Undesired, lexicographic ordering:
version-1 version-10 version-2
| Modifier and Type | Field and Description |
|---|---|
static FilenameComparator |
INSTANCE |
| Constructor and Description |
|---|
FilenameComparator() |
| 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 static final FilenameComparator INSTANCE
public final int compare(String o1, String o2)
compare in interface Comparator<String>Copyright © 2019. All rights reserved.