private static final class ComparisonChain.InactiveComparisonChain extends ComparisonChain
| Modifier and Type | Field and Description |
|---|---|
(package private) int |
result |
| Constructor and Description |
|---|
InactiveComparisonChain(int result) |
| Modifier and Type | Method and Description |
|---|---|
ComparisonChain |
compare(java.lang.Comparable left,
java.lang.Comparable right)
Compares two comparable objects as specified by
Comparable.compareTo(T), if the
result of this comparison chain has not already been determined. |
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. |
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. |
ComparisonChain |
compare(int left,
int right)
Compares two
int values as specified by Ints.compare(int, int), if the result of
this comparison chain has not already been determined. |
ComparisonChain |
compare(long left,
long right)
Compares two
long values as specified by Longs.compare(long, long), if the result of
this comparison chain has not already been determined. |
<T> 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.
|
ComparisonChain |
compareFalseFirst(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. |
ComparisonChain |
compareTrueFirst(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()
Ends this comparison chain and returns its result: a value having the same sign as the first
nonzero comparison result in the chain, or zero if every result was zero.
|
compare, startpublic ComparisonChain compare(java.lang.Comparable left, java.lang.Comparable right)
ComparisonChainComparable.compareTo(T), if the
result of this comparison chain has not already been determined.compare in class ComparisonChainpublic <T> ComparisonChain compare(T left, T right, java.util.Comparator<T> comparator)
ComparisonChaincompare in class ComparisonChainpublic ComparisonChain compare(int left, int right)
ComparisonChainint values as specified by Ints.compare(int, int), if the result of
this comparison chain has not already been determined.compare in class ComparisonChainpublic ComparisonChain compare(long left, long right)
ComparisonChainlong values as specified by Longs.compare(long, long), if the result of
this comparison chain has not already been determined.compare in class ComparisonChainpublic ComparisonChain compare(float left, float right)
ComparisonChainfloat values as specified by Float.compare(float, float), if the result
of this comparison chain has not already been determined.compare in class ComparisonChainpublic ComparisonChain compare(double left, double right)
ComparisonChaindouble values as specified by Double.compare(double, double), if the result
of this comparison chain has not already been determined.compare in class ComparisonChainpublic ComparisonChain compareTrueFirst(boolean left, boolean right)
ComparisonChainboolean values, considering true to be less than false,
if the result of this comparison chain has not already been determined.compareTrueFirst in class ComparisonChainpublic ComparisonChain compareFalseFirst(boolean left, boolean right)
ComparisonChainboolean values, considering false to be less than true,
if the result of this comparison chain has not already been determined.compareFalseFirst in class ComparisonChainpublic int result()
ComparisonChainresult in class ComparisonChain