public final class Chain
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Chain.ComparisonChain |
static class |
Chain.EquivalenceChain |
static class |
Chain.HashCodeChain |
Modifier and Type | Method and Description |
---|---|
static 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. |
static 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. |
static 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. |
static 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. |
static <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. |
static <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.
|
static 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. |
static 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. |
static Chain.EquivalenceChain |
equals(boolean left,
boolean right)
Compares two
boolean values as specified by left == right ,
if the result of this equivalence chain has not already been
determined. |
static Chain.EquivalenceChain |
equals(double left,
double right)
Compares two
double values as specified by Double.compare(double, double) , if the result of this equivalence chain has not
already been determined. |
static Chain.EquivalenceChain |
equals(float left,
float right)
Compares two
float values as specified by Float.compare(float, float) , if the result of this equivalence chain has not
already been determined. |
static Chain.EquivalenceChain |
equals(int left,
int right)
Compares two
int values as specified by left == right ,
if the result of this equivalence chain has not already been
determined. |
static Chain.EquivalenceChain |
equals(long left,
long right)
Compares two
long values as specified by left == right ,
if the result of this equivalence chain has not already been
determined. |
static Chain.EquivalenceChain |
equals(java.lang.Object left,
java.lang.Object right)
Compares two comparable objects as specified by
N.equals(Object, Object) , if the result of this equivalence chain
has not already been determined. |
static Chain.HashCodeChain |
hash(boolean value)
Add the hash code of the specified
value to result. |
static Chain.HashCodeChain |
hash(double value)
Add the hash code of the specified
value to result. |
static Chain.HashCodeChain |
hash(float value)
Add the hash code of the specified
value to result. |
static Chain.HashCodeChain |
hash(int value)
Add the hash code of the specified
value to result. |
static Chain.HashCodeChain |
hash(long value)
Add the hash code of the specified
value to result. |
static Chain.HashCodeChain |
hash(java.lang.Object value)
Add the hash code of the specified
value to result. |
public static <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
- ComparisonChain
public static <T> Chain.ComparisonChain compare(T left, T right, java.util.Comparator<T> comparator)
left
- right
- ComparisonChain
public static 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
- ComparisonChain
public static 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
- ComparisonChain
public static 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
- ComparisonChain
public static 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
- ComparisonChain
public static 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
- ComparisonChain
public static 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
- ComparisonChain
public static Chain.EquivalenceChain equals(java.lang.Object left, java.lang.Object right)
N.equals(Object, Object)
, if the result of this equivalence chain
has not already been determined.left
- right
- EquivalenceChain
public static Chain.EquivalenceChain equals(int left, int right)
int
values as specified by left == right
,
if the result of this equivalence chain has not already been
determined.left
- right
- EquivalenceChain
public static Chain.EquivalenceChain equals(long left, long right)
long
values as specified by left == right
,
if the result of this equivalence chain has not already been
determined.left
- right
- EquivalenceChain
public static Chain.EquivalenceChain equals(float left, float right)
float
values as specified by Float.compare(float, float)
, if the result of this equivalence chain has not
already been determined.left
- right
- EquivalenceChain
public static Chain.EquivalenceChain equals(double left, double right)
double
values as specified by Double.compare(double, double)
, if the result of this equivalence chain has not
already been determined.left
- right
- EquivalenceChain
public static Chain.EquivalenceChain equals(boolean left, boolean right)
boolean
values as specified by left == right
,
if the result of this equivalence chain has not already been
determined.left
- right
- EquivalenceChain
public static Chain.HashCodeChain hash(java.lang.Object value)
value
to result.value
- public static Chain.HashCodeChain hash(int value)
value
to result.value
- public static Chain.HashCodeChain hash(long value)
value
to result.value
- public static Chain.HashCodeChain hash(float value)
value
to result.value
- public static Chain.HashCodeChain hash(double value)
value
to result.value
- public static Chain.HashCodeChain hash(boolean value)
value
to result.value
-