Package org.apache.jackrabbit.vault.util
Class PathComparator
- java.lang.Object
-
- org.apache.jackrabbit.vault.util.PathComparator
-
- All Implemented Interfaces:
Comparator<String>
public class PathComparator extends Object implements Comparator<String>
PathComparator
...
-
-
Constructor Summary
Constructors Constructor Description PathComparator()
PathComparator(boolean reverse)
PathComparator(char separator)
PathComparator(char separator, boolean reverse)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(String o1, String o2)
Compared to theString.compareTo(String)
it handles the '/' differently giving it the highest priority so that:-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
compare
public int compare(String o1, String o2)
Compared to theString.compareTo(String)
it handles the '/' differently giving it the highest priority so that:"/a" < "/b" "/a1foo" < "/a/foo"
- Specified by:
compare
in interfaceComparator<String>
-
-