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

boolean

between(A b, A c)

Tests if [b <= a <= c] or [b >= a >= c] where the a is object passed to ComparableUtils.is(A).

boolean

betweenExclusive(A b, A c)

Tests if (b < a < c) or (b > a > c) where the a is object passed to ComparableUtils.is(A).

boolean

equalTo(A b)

Tests if the object passed to ComparableUtils.is(A) is equal to b

boolean

greaterThan(A b)

Tests if the object passed to ComparableUtils.is(A) is greater than b

boolean

greaterThanOrEqualTo(A b)

Tests if the object passed to ComparableUtils.is(A) is greater than or equal to b

boolean

lessThan(A b)

Tests if the object passed to ComparableUtils.is(A) is less than b

boolean

lessThanOrEqualTo(A b)

Tests if the object passed to ComparableUtils.is(A) is less than or equal to b

public boolean between(A b, A c)[source]

Tests if [b <= a <= c] or [b >= a >= c] where the a is object passed to ComparableUtils.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 the a is object passed to ComparableUtils.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 to b

Parameters:

b – The object to compare to the base object

Returns:

true if the value returned by Comparable.compareTo(T) is equal to 0

public boolean greaterThan(A b)[source]

Tests if the object passed to ComparableUtils.is(A) is greater than b

Parameters:

b – The object to compare to the base object

Returns:

true if the value returned by Comparable.compareTo(T) is greater than 0

public boolean greaterThanOrEqualTo(A b)[source]

Tests if the object passed to ComparableUtils.is(A) is greater than or equal to b

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 to 0

public boolean lessThan(A b)[source]

Tests if the object passed to ComparableUtils.is(A) is less than b

Parameters:

b – The object to compare to the base object

Returns:

true if the value returned by Comparable.compareTo(T) is less than 0

public boolean lessThanOrEqualTo(A b)[source]

Tests if the object passed to ComparableUtils.is(A) is less than or equal to b

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 to 0