ComparableUtils.ComparableCheckBuilder¶
- public static class org.apache.commons.lang3.compare.ComparableUtils.ComparableCheckBuilder<A extends Comparable<A>>[source]¶
Compares objects of a given generic type
A.- Type parameters:
<A> – The type of objects that this object may be compared against.
Methods¶
|
Tests if |
|
|
Tests if |
|
|
Tests if the object passed to |
|
|
Tests if the object passed to |
|
|
Tests if the object passed to |
|
|
Tests if the object passed to |
|
|
Tests if the object passed to |
- public boolean between(A b, A c)[source]¶
Tests if
[b <= a <= c]or[b >= a >= c]where theais object passed toComparableUtils.is(A).- Parameters:
b – The object to compare to the base object
c – The object to compare to the base object
- Returns:
true if the base object is between b and c
- public boolean betweenExclusive(A b, A c)[source]¶
Tests if
(b < a < c)or(b > a > c)where theais object passed toComparableUtils.is(A).- Parameters:
b – The object to compare to the base object
c – The object to compare to the base object
- Returns:
true if the base object is between b and c and not equal to those
- public boolean equalTo(A b)[source]¶
Tests if the object passed to
ComparableUtils.is(A)is equal tob- Parameters:
b – The object to compare to the base object
- Returns:
true if the value returned by
Comparable.compareTo(T)is equal to0
- public boolean greaterThan(A b)[source]¶
Tests if the object passed to
ComparableUtils.is(A)is greater thanb- Parameters:
b – The object to compare to the base object
- Returns:
true if the value returned by
Comparable.compareTo(T)is greater than0
- public boolean greaterThanOrEqualTo(A b)[source]¶
Tests if the object passed to
ComparableUtils.is(A)is greater than or equal tob- Parameters:
b – The object to compare to the base object
- Returns:
true if the value returned by
Comparable.compareTo(T)is greater than or equal to0
- public boolean lessThan(A b)[source]¶
Tests if the object passed to
ComparableUtils.is(A)is less thanb- Parameters:
b – The object to compare to the base object
- Returns:
true if the value returned by
Comparable.compareTo(T)is less than0
- public boolean lessThanOrEqualTo(A b)[source]¶
Tests if the object passed to
ComparableUtils.is(A)is less than or equal tob- Parameters:
b – The object to compare to the base object
- Returns:
true if the value returned by
Comparable.compareTo(T)is less than or equal to0