private static final class Comparison.DeadComparison extends Comparison
| Modifier and Type | Field and Description |
|---|---|
private int |
result |
EQUAL, GREATER, LESS| Constructor and Description |
|---|
DeadComparison(int result) |
| Modifier and Type | Method and Description |
|---|---|
Comparison |
compare(boolean left,
boolean right)
Compares the left boolean to the double boolean.
|
Comparison |
compare(java.lang.Comparable<?> left,
java.lang.Comparable<?> right)
Compares the left comparable to the right as specified by the
Comparable.compareTo(Object) interface. |
Comparison |
compare(double left,
double right)
Compares the left double to the double integer.
|
Comparison |
compare(float left,
float right)
Compares the left float to the float integer.
|
Comparison |
compare(int left,
int right)
Compares the left integer to the right integer.
|
Comparison |
compare(long left,
long right)
Compares the left long to the right long.
|
<T> Comparison |
compare(T left,
T right,
java.util.Comparator<T> comparator)
Compares the left object to the right object as specified by the
Comparator.compare(Object, Object)
interface. |
Comparison |
getInstance()
Returns the comparison instance being used.
|
int |
result()
Ends the comparison and returns 0 if all comparisons were equal, -1 if
the any of the left comparisons were less than the right comparisons or
1 if any of the right comparisons were less than the left.
|
begin, beginAllowNullpublic Comparison compare(java.lang.Comparable<?> left, java.lang.Comparable<?> right)
ComparisonComparable.compareTo(Object) interface.compare in class Comparisonleft - the object to compare to the right.right - the object compared to the left.public <T> Comparison compare(T left, T right, java.util.Comparator<T> comparator)
ComparisonComparator.compare(Object, Object)
interface.compare in class ComparisonT - the type of the object to the compared.left - the object to compare to the right.right - the object compared to the left.comparator - the comparator used to compare the objects.public Comparison compare(int left, int right)
Comparisoncompare in class Comparisonleft - the integer to compare to the right.right - the integer compared to the left.public Comparison compare(long left, long right)
Comparisoncompare in class Comparisonleft - the long to compare to the right.right - the long compared to the left.public Comparison compare(float left, float right)
Comparisoncompare in class Comparisonleft - the float to compare to the right.right - the float compared to the left.public Comparison compare(double left, double right)
Comparisoncompare in class Comparisonleft - the double to compare to the right.right - the double compared to the left.public Comparison compare(boolean left, boolean right)
Comparisoncompare in class Comparisonleft - the boolean to compare to the right.right - the boolean compared to the left.public int result()
Comparisonresult in class Comparisonpublic Comparison getInstance()
ComparisongetInstance in class Comparison