Serializable
, Comparator<Object>
public class FastComparableComparator extends Object implements Comparator<Object>, Serializable
ComparableComparator
, it will not throw exception when the two compareTo
methods don't provide an inverse result of each other as per the Comparable javadoc. We do so mainly to reduce one
call to compareTo. Constructor | Description |
---|---|
FastComparableComparator() |
Constructs a FastComparableComparator.
|
Modifier and Type | Method | Description |
---|---|---|
int |
compare(Object o1,
Object o2) |
|
static FastComparableComparator |
getInstance() |
Return a shared instance of a ComparableComparator.
|
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public FastComparableComparator()
public static FastComparableComparator getInstance()
public int compare(Object o1, Object o2)
compare
in interface Comparator<Object>