public class PathComparator extends Object implements Comparator<String>
PathComparator...| Constructor and Description |
|---|
PathComparator() |
PathComparator(boolean reverse) |
PathComparator(char separator) |
PathComparator(char separator,
boolean reverse) |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(String o1,
String o2)
Compared to the
String.compareTo(String) it handles the '/'
differently giving it the highest priority so that: |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic PathComparator()
public PathComparator(boolean reverse)
public PathComparator(char separator)
public PathComparator(char separator,
boolean reverse)
public int compare(String o1, String o2)
String.compareTo(String) it handles the '/'
differently giving it the highest priority so that:
"/a" < "/b" "/a1foo" < "/a/foo"
compare in interface Comparator<String>Copyright © 2010 - 2020 Adobe. All Rights Reserved