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.- 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 to#is.- 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 to#is.- 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
#isis equal tob- Parameters:
b – The object to compare to the base object
- Returns:
true if the value returned by
Comparable#compareTois equal to0
- public boolean greaterThan(A b)[source]¶
Tests if the object passed to
#isis greater thanb- Parameters:
b – The object to compare to the base object
- Returns:
true if the value returned by
Comparable#compareTois greater than0
- public boolean greaterThanOrEqualTo(A b)[source]¶
Tests if the object passed to
#isis greater than or equal tob- Parameters:
b – The object to compare to the base object
- Returns:
true if the value returned by
Comparable#compareTois greater than or equal to0
- public boolean lessThan(A b)[source]¶
Tests if the object passed to
#isis less thanb- Parameters:
b – The object to compare to the base object
- Returns:
true if the value returned by
Comparable#compareTois less than0
- public boolean lessThanOrEqualTo(A b)[source]¶
Tests if the object passed to
#isis less than or equal tob- Parameters:
b – The object to compare to the base object
- Returns:
true if the value returned by
Comparable#compareTois less than or equal to0