Package org.apache.commons.lang3.compare
Class ComparableUtils.ComparableCheckBuilder<A extends java.lang.Comparable<A>>
- java.lang.Object
-
- org.apache.commons.lang3.compare.ComparableUtils.ComparableCheckBuilder<A>
-
- Type Parameters:
A
- the type of objects that this object may be compared against.
- Enclosing class:
- ComparableUtils
public static class ComparableUtils.ComparableCheckBuilder<A extends java.lang.Comparable<A>> extends java.lang.Object
Provides access to the available methods
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
between(A b, A c)
boolean
betweenExclusive(A b, A c)
boolean
equalTo(A b)
Checks if the object passed toComparableUtils.is(A)
is equal tob
boolean
greaterThan(A b)
Checks if the object passed toComparableUtils.is(A)
is greater thanb
boolean
greaterThanOrEqualTo(A b)
Checks if the object passed toComparableUtils.is(A)
is greater than or equal tob
boolean
lessThan(A b)
Checks if the object passed toComparableUtils.is(A)
is less thanb
boolean
lessThanOrEqualTo(A b)
Checks if the object passed toComparableUtils.is(A)
is less than or equal tob
-
-
-
Method Detail
-
between
public boolean between(A b, A c)
- Parameters:
b
- the object to compare to the base objectc
- the object to compare to the base object- Returns:
- true if the base object is between b and c
-
betweenExclusive
public boolean betweenExclusive(A b, A c)
- Parameters:
b
- the object to compare to the base objectc
- the object to compare to the base object- Returns:
- true if the base object is between b and c and not equal to those
-
equalTo
public boolean equalTo(A b)
Checks if the object passed toComparableUtils.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
-
greaterThan
public boolean greaterThan(A b)
Checks if the object passed toComparableUtils.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
-
greaterThanOrEqualTo
public boolean greaterThanOrEqualTo(A b)
Checks if the object passed toComparableUtils.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
-
lessThan
public boolean lessThan(A b)
Checks if the object passed toComparableUtils.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
-
lessThanOrEqualTo
public boolean lessThanOrEqualTo(A b)
Checks if the object passed toComparableUtils.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
-
-