Class ComparableUtils.ComparableCheckBuilder<A extends java.lang.Comparable<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 Detail

      • between

        public boolean between​(A b,
                               A c)
        Checks 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)
        Checks 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)
        Checks 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)
        Checks 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)
        Checks 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)
        Checks 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)
        Checks 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