Interface ComparableAssert<S,A extends Comparable<? super A>>

Type Parameters:
S - the "self" type of this assertion class. Please read "Emulating 'self types' using Java Generics to simplify fluent API implementation" for more details.
A - the type of the "actual" value.
All Known Subinterfaces:
UnevenComparableAssert<S,T>
All Known Implementing Classes:
AbstractComparableAssert, AbstractUnevenComparableAssert, BigDecimalAssert, ByteAssert, CharacterAssert, DoubleAssert, FloatAssert, IntegerAssert, LongAssert, ShortAssert

public interface ComparableAssert<S,A extends Comparable<? super A>>
Assertion methods applicable to Comparables.
Author:
Alex Ruiz, Ted M. Young
  • Method Summary

    Modifier and Type
    Method
    Description
    Verifies that the actual value is greater than the given one.
    Verifies that the actual value is greater than or equal to the given one.
    isLessThan(A other)
    Verifies that the actual value is less than the given one.
    Verifies that the actual value is less than or equal to the given one.
  • Method Details

    • isLessThan

      S isLessThan(A other)
      Verifies that the actual value is less than the given one.
      Parameters:
      other - the given value to compare the actual value to.
      Returns:
      this assertion object.
      Throws:
      AssertionError - if the actual value is null.
      AssertionError - if the actual value is equal to or greater than the given one.
    • isLessThanOrEqualTo

      S isLessThanOrEqualTo(A other)
      Verifies that the actual value is less than or equal to the given one.
      Parameters:
      other - the given value to compare the actual value to.
      Returns:
      this assertion object.
      Throws:
      AssertionError - if the actual value is null.
      AssertionError - if the actual value is greater than the given one.
    • isGreaterThan

      S isGreaterThan(A other)
      Verifies that the actual value is greater than the given one.
      Parameters:
      other - the given value to compare the actual value to.
      Returns:
      this assertion object.
      Throws:
      AssertionError - if the actual value is null.
      AssertionError - if the actual value is equal to or less than the given one.
    • isGreaterThanOrEqualTo

      S isGreaterThanOrEqualTo(A other)
      Verifies that the actual value is greater than or equal to the given one.
      Parameters:
      other - the given value to compare the actual value to.
      Returns:
      this assertion object.
      Throws:
      AssertionError - if the actual value is null.
      AssertionError - if the actual value is less than the given one.