Package com.landawn.abacus.util
Class Builder.ComparisonBuilder
java.lang.Object
com.landawn.abacus.util.Builder.ComparisonBuilder
The Class ComparisonChain.
-
Method Summary
Modifier and TypeMethodDescriptioncompare
(byte left, byte right) Compares twobyte
values as specified byCommonUtil.compare(boolean, boolean)
, if the result of this comparison chain has not already been determined.compare
(char left, char right) Compares twochar
values as specified byCommonUtil.compare(boolean, boolean)
, if the result of this comparison chain has not already been determined.compare
(double left, double right) Compares twodouble
values as specified byDouble.compare(double, double)
, if the result of this comparison chain has not already been determined.compare
(float left, float right) Compares twofloat
values as specified byFloat.compare(float, float)
, if the result of this comparison chain has not already been determined.compare
(int left, int right) Compares twoint
values as specified byCommonUtil.compare(boolean, boolean)
, if the result of this comparison chain has not already been determined.compare
(long left, long right) Compares twolong
values as specified byCommonUtil.compare(boolean, boolean)
, if the result of this comparison chain has not already been determined.compare
(short left, short right) Compares twoshort
values as specified byCommonUtil.compare(boolean, boolean)
, if the result of this comparison chain has not already been determined.<T extends Comparable<? super T>>
Builder.ComparisonBuildercompare
(T left, T right) Compares two comparable objects as specified byComparable.compareTo(T)
, if the result of this comparison chain has not already been determined.compare
(T left, T right, Comparator<T> comparator) Compares two objects using a comparator, if the result of this comparison chain has not already been determined.compare
(T left, T right, BiFunction<? super T, ? super T, Integer> func) compareFalseLess
(boolean left, boolean right) Compares twoboolean
values, consideringfalse
to be less thantrue
, if the result of this comparison chain has not already been determined.<T extends Comparable<? super T>>
Builder.ComparisonBuildercompareNullBigger
(T left, T right) null
is bigger.<T extends Comparable<? super T>>
Builder.ComparisonBuildercompareNullLess
(T left, T right) null
is smaller.compareTrueLess
(boolean left, boolean right) Compares twoboolean
values, consideringtrue
to be less thanfalse
, if the result of this comparison chain has not already been determined.int
result()
-
Method Details
-
compare
Compares two comparable objects as specified byComparable.compareTo(T)
, if the result of this comparison chain has not already been determined.- Type Parameters:
T
-- Parameters:
left
-right
-- Returns:
- this
-
compare
Compares two objects using a comparator, if the result of this comparison chain has not already been determined.- Type Parameters:
T
-- Parameters:
left
-right
-comparator
-- Returns:
- this
-
compare
public <T> Builder.ComparisonBuilder compare(T left, T right, BiFunction<? super T, ? super T, Integer> func) - Type Parameters:
T
-- Parameters:
left
-right
-func
-- Returns:
-
compareNullLess
null
is smaller.- Type Parameters:
T
-- Parameters:
left
-right
-- Returns:
-
compareNullBigger
public <T extends Comparable<? super T>> Builder.ComparisonBuilder compareNullBigger(T left, T right) null
is bigger.- Type Parameters:
T
-- Parameters:
left
-right
-- Returns:
-
compareFalseLess
Compares twoboolean
values, consideringfalse
to be less thantrue
, if the result of this comparison chain has not already been determined.- Parameters:
left
-right
-- Returns:
- this
-
compareTrueLess
Compares twoboolean
values, consideringtrue
to be less thanfalse
, if the result of this comparison chain has not already been determined.- Parameters:
left
-right
-- Returns:
- this
-
compare
Compares twochar
values as specified byCommonUtil.compare(boolean, boolean)
, if the result of this comparison chain has not already been determined.- Parameters:
left
-right
-- Returns:
- this
-
compare
Compares twobyte
values as specified byCommonUtil.compare(boolean, boolean)
, if the result of this comparison chain has not already been determined.- Parameters:
left
-right
-- Returns:
- this
-
compare
Compares twoshort
values as specified byCommonUtil.compare(boolean, boolean)
, if the result of this comparison chain has not already been determined.- Parameters:
left
-right
-- Returns:
- this
-
compare
Compares twoint
values as specified byCommonUtil.compare(boolean, boolean)
, if the result of this comparison chain has not already been determined.- Parameters:
left
-right
-- Returns:
- this
-
compare
Compares twolong
values as specified byCommonUtil.compare(boolean, boolean)
, if the result of this comparison chain has not already been determined.- Parameters:
left
-right
-- Returns:
- this
-
compare
Compares twofloat
values as specified byFloat.compare(float, float)
, if the result of this comparison chain has not already been determined.- Parameters:
left
-right
-- Returns:
- this
-
compare
Compares twodouble
values as specified byDouble.compare(double, double)
, if the result of this comparison chain has not already been determined.- Parameters:
left
-right
-- Returns:
- this
-
result
public int result()- Returns:
-