org.assertj.core.api
Interface ComparableAssert<S extends ComparableAssert<S,A>,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:
AbstractBigDecimalAssert, AbstractByteAssert, AbstractCharacterAssert, AbstractComparableAssert, AbstractDoubleAssert, AbstractFloatAssert, AbstractIntegerAssert, AbstractLongAssert, AbstractShortAssert, AbstractUnevenComparableAssert, BigDecimalAssert, ByteAssert, CharacterAssert, DoubleAssert, FloatAssert, GenericComparableAssert, IntegerAssert, LongAssert, ShortAssert

public interface ComparableAssert<S extends ComparableAssert<S,A>,A extends Comparable<? super A>>

Assertion methods applicable to Comparables.

Author:
Alex Ruiz, Ted M. Young, Mikhail Mazursky

Method Summary
 S isGreaterThan(A other)
          Verifies that the actual value is greater than the given one.
 S isGreaterThanOrEqualTo(A other)
          Verifies that the actual value is greater than or equal to the given one.
 S isLessThan(A other)
          Verifies that the actual value is less than the given one.
 S isLessThanOrEqualTo(A other)
          Verifies that the actual value is less than or equal to the given one.
 

Method Detail

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.


Copyright © 2013–2015 AssertJ. All rights reserved.