public static class Chain.ComparisonChain
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
Chain.ComparisonChain |
compare(double left,
double right)
Compares two
double values as specified by Double.compare(double, double) , if the result of this comparison chain has not
already been determined. |
Chain.ComparisonChain |
compare(float left,
float right)
Compares two
float values as specified by Float.compare(float, float) , if the result of this comparison chain has not
already been determined. |
Chain.ComparisonChain |
compare(int left,
int right)
Compares two
int values as specified by N.compare(boolean, boolean) ,
if the result of this comparison chain has not already been
determined. |
Chain.ComparisonChain |
compare(long left,
long right)
Compares two
long values as specified by N.compare(boolean, boolean) ,
if the result of this comparison chain has not already been
determined. |
<T extends java.lang.Comparable<? super T>> |
compare(T left,
T right)
Compares two comparable objects as specified by
Comparable.compareTo(T) , if the result of this comparison chain
has not already been determined. |
<T> Chain.ComparisonChain |
compare(T left,
T right,
java.util.Comparator<T> comparator)
Compares two objects using a comparator, if the result of this
comparison chain has not already been determined.
|
<T,E extends java.lang.Exception> |
compare(T left,
T right,
Try.BiFunction<? super T,? super T,java.lang.Integer,E> func) |
Chain.ComparisonChain |
compareFalseLess(boolean left,
boolean right)
Compares two
boolean values, considering false to be less
than true , if the result of this comparison chain has not
already been determined. |
Chain.ComparisonChain |
compareTrueLess(boolean left,
boolean right)
Compares two
boolean values, considering true to be less
than false , if the result of this comparison chain has not
already been determined. |
int |
result() |
public <T extends java.lang.Comparable<? super T>> Chain.ComparisonChain compare(T left, T right)
Comparable.compareTo(T)
, if the result of this comparison chain
has not already been determined.left
- right
- public <T> Chain.ComparisonChain compare(T left, T right, java.util.Comparator<T> comparator)
left
- right
- public <T,E extends java.lang.Exception> Chain.ComparisonChain compare(T left, T right, Try.BiFunction<? super T,? super T,java.lang.Integer,E> func) throws E extends java.lang.Exception
E extends java.lang.Exception
public Chain.ComparisonChain compare(int left, int right)
int
values as specified by N.compare(boolean, boolean)
,
if the result of this comparison chain has not already been
determined.left
- right
- public Chain.ComparisonChain compare(long left, long right)
long
values as specified by N.compare(boolean, boolean)
,
if the result of this comparison chain has not already been
determined.left
- right
- public Chain.ComparisonChain compare(float left, float right)
float
values as specified by Float.compare(float, float)
, if the result of this comparison chain has not
already been determined.left
- right
- public Chain.ComparisonChain compare(double left, double right)
double
values as specified by Double.compare(double, double)
, if the result of this comparison chain has not
already been determined.left
- right
- public Chain.ComparisonChain compareFalseLess(boolean left, boolean right)
boolean
values, considering false
to be less
than true
, if the result of this comparison chain has not
already been determined.left
- right
- public Chain.ComparisonChain compareTrueLess(boolean left, boolean right)
boolean
values, considering true
to be less
than false
, if the result of this comparison chain has not
already been determined.left
- right
- public int result()