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:
"/a" < "/b"
"/a1foo" < "/a/foo" |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals
public 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 © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"