ComparableUtils.ComparableCheckBuilder (Apache Commons Lang 3.20.0 API)
Description: declaration: package: org.apache.commons.lang3.compare, class: ComparableUtils, class: ComparableCheckBuilder

# Class ComparableUtils.ComparableCheckBuilder<A extends 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 Comparable<A>> extends Object
Compares objects of a given generic type `A`.

Since:
  3.10

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### between

    public 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)`.
    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

  - ### betweenExclusive

    public 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)`.
    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

  - ### equalTo

    public boolean equalTo(A b)
    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`

  - ### greaterThan

    public boolean greaterThan(A b)
    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`

  - ### greaterThanOrEqualTo

    public boolean greaterThanOrEqualTo(A b)
    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`

  - ### lessThan

    public boolean lessThan(A b)
    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`

  - ### lessThanOrEqualTo

    public boolean lessThanOrEqualTo(A b)
    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`