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.
  • Method Details Link icon

    • between Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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