Package org.apache.camel.support
Class OrderedComparator
- java.lang.Object
-
- org.apache.camel.support.OrderedComparator
-
- All Implemented Interfaces:
Comparator<Object>
public final class OrderedComparator extends Object implements Comparator<Object>
A comparator to sortOrdered
-
-
Constructor Summary
Constructors Constructor Description OrderedComparator()
Favor using the static instanceget()
OrderedComparator(boolean reverse)
Favor using the static instancegetReverse()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Object o1, Object o2)
static OrderedComparator
get()
Gets the comparator that sorts a..zstatic OrderedComparator
getReverse()
Gets the comparator that sorts z..a (reverse)-
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
-
-
-
-
Constructor Detail
-
OrderedComparator
public OrderedComparator()
Favor using the static instanceget()
-
OrderedComparator
public OrderedComparator(boolean reverse)
Favor using the static instancegetReverse()
-
-
Method Detail
-
get
public static OrderedComparator get()
Gets the comparator that sorts a..z
-
getReverse
public static OrderedComparator getReverse()
Gets the comparator that sorts z..a (reverse)
-
compare
public int compare(Object o1, Object o2)
- Specified by:
compare
in interfaceComparator<Object>
-
-