Package org.apache.jackrabbit.vault.util
Class PathComparator
java.lang.Object
org.apache.jackrabbit.vault.util.PathComparator
- All Implemented Interfaces:
Comparator<String>
PathComparator...-
Constructor Summary
ConstructorsConstructorDescriptionPathComparator(boolean reverse) PathComparator(char separator) PathComparator(char separator, boolean reverse) -
Method Summary
Modifier and TypeMethodDescriptionintCompared 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, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
PathComparator
public PathComparator() -
PathComparator
public PathComparator(boolean reverse) -
PathComparator
public PathComparator(char separator) -
PathComparator
public PathComparator(char separator, boolean reverse)
-
-
Method Details
-
compare
Compared to theString.compareTo(String)it handles the '/' differently giving it the highest priority so that:"/a" < "/b" "/a1foo" < "/a/foo"
- Specified by:
comparein interfaceComparator<String>
-