Package com.google.common.collect
Class ComparisonChain.InactiveComparisonChain
- java.lang.Object
-
- com.google.common.collect.ComparisonChain
-
- com.google.common.collect.ComparisonChain.InactiveComparisonChain
-
- Enclosing class:
- ComparisonChain
private static final class ComparisonChain.InactiveComparisonChain extends ComparisonChain
-
-
Field Summary
Fields Modifier and Type Field Description (package private) intresult
-
Constructor Summary
Constructors Constructor Description InactiveComparisonChain(int result)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComparisonChaincompare(double left, double right)Compares twodoublevalues as specified byDouble.compare(double, double), if the result of this comparison chain has not already been determined.ComparisonChaincompare(float left, float right)Compares twofloatvalues as specified byFloat.compare(float, float), if the result of this comparison chain has not already been determined.ComparisonChaincompare(int left, int right)Compares twointvalues as specified byInts.compare(int, int), if the result of this comparison chain has not already been determined.ComparisonChaincompare(long left, long right)Compares twolongvalues as specified byLongs.compare(long, long), if the result of this comparison chain has not already been determined.ComparisonChaincompare(java.lang.Comparable left, java.lang.Comparable right)Compares two comparable objects as specified byComparable.compareTo(T), if the result of this comparison chain has not already been determined.<T> ComparisonChaincompare(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.ComparisonChaincompareFalseFirst(boolean left, boolean right)Compares twobooleanvalues, consideringfalseto be less thantrue, if the result of this comparison chain has not already been determined.ComparisonChaincompareTrueFirst(boolean left, boolean right)Compares twobooleanvalues, consideringtrueto be less thanfalse, if the result of this comparison chain has not already been determined.intresult()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.-
Methods inherited from class com.google.common.collect.ComparisonChain
compare, start
-
-
-
-
Method Detail
-
compare
public ComparisonChain compare(java.lang.Comparable left, java.lang.Comparable right)
Description copied from class:ComparisonChainCompares two comparable objects as specified byComparable.compareTo(T), if the result of this comparison chain has not already been determined.- Specified by:
comparein classComparisonChain
-
compare
public <T> ComparisonChain compare(T left, T right, java.util.Comparator<T> comparator)
Description copied from class:ComparisonChainCompares two objects using a comparator, if the result of this comparison chain has not already been determined.- Specified by:
comparein classComparisonChain
-
compare
public ComparisonChain compare(int left, int right)
Description copied from class:ComparisonChainCompares twointvalues as specified byInts.compare(int, int), if the result of this comparison chain has not already been determined.- Specified by:
comparein classComparisonChain
-
compare
public ComparisonChain compare(long left, long right)
Description copied from class:ComparisonChainCompares twolongvalues as specified byLongs.compare(long, long), if the result of this comparison chain has not already been determined.- Specified by:
comparein classComparisonChain
-
compare
public ComparisonChain compare(float left, float right)
Description copied from class:ComparisonChainCompares twofloatvalues as specified byFloat.compare(float, float), if the result of this comparison chain has not already been determined.- Specified by:
comparein classComparisonChain
-
compare
public ComparisonChain compare(double left, double right)
Description copied from class:ComparisonChainCompares twodoublevalues as specified byDouble.compare(double, double), if the result of this comparison chain has not already been determined.- Specified by:
comparein classComparisonChain
-
compareTrueFirst
public ComparisonChain compareTrueFirst(boolean left, boolean right)
Description copied from class:ComparisonChainCompares twobooleanvalues, consideringtrueto be less thanfalse, if the result of this comparison chain has not already been determined.- Specified by:
compareTrueFirstin classComparisonChain
-
compareFalseFirst
public ComparisonChain compareFalseFirst(boolean left, boolean right)
Description copied from class:ComparisonChainCompares twobooleanvalues, consideringfalseto be less thantrue, if the result of this comparison chain has not already been determined.- Specified by:
compareFalseFirstin classComparisonChain
-
result
public int result()
Description copied from class:ComparisonChainEnds 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.- Specified by:
resultin classComparisonChain
-
-