public class PathComparator
extends java.lang.Object
implements java.util.Comparator<java.lang.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(java.lang.String o1,
java.lang.String o2)
Compared to the
String.compareTo(String) it handles the '/'
differently giving it the highest priority so that: |
public PathComparator()
public PathComparator(boolean reverse)
public PathComparator(char separator)
public PathComparator(char separator, boolean reverse)
public int compare(java.lang.String o1, java.lang.String o2)
String.compareTo(String)
it handles the '/'
differently giving it the highest priority so that:
"/a" < "/b" "/a1foo" < "/a/foo"
compare
in interface java.util.Comparator<java.lang.String>
Copyright © 2010 - 2020 Adobe. All Rights Reserved