@FunctionalInterface public interface DoubleComparator extends Comparator<Double>
Comparator; provides methods to compare two primitive types both as objects
and as primitive types.
Note that fastutil provides a corresponding abstract class that
can be used to implement this interface just by specifying the type-specific
comparator.
Comparator| Modifier and Type | Method and Description |
|---|---|
int |
compare(double k1,
double k2)
Compares its two primitive-type arguments for order.
|
default int |
compare(Double ok1,
Double ok2)
Deprecated.
Please use the corresponding type-specific method instead.
|
default DoubleComparator |
reversed() |
default Comparator<Double> |
thenComparing(Comparator<? super Double> second) |
default DoubleComparator |
thenComparing(DoubleComparator second)
Return a new comparator that first uses this comparator, then uses the second comparator
if this comparator compared the two elements as equal.
|
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reverseOrder, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongint compare(double k1,
double k2)
Comparatordefault DoubleComparator reversed()
reversed in interface Comparator<Double>@Deprecated default int compare(Double ok1, Double ok2)
This implementation delegates to the corresponding type-specific method.
compare in interface Comparator<Double>default DoubleComparator thenComparing(DoubleComparator second)
Comparator.thenComparing(Comparator)default Comparator<Double> thenComparing(Comparator<? super Double> second)
thenComparing in interface Comparator<Double>