Package org.fest.assertions.core
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
Comparable
s.- Author:
- Alex Ruiz, Ted M. Young
-
Method Summary
Modifier and TypeMethodDescriptionisGreaterThan
(A other) Verifies that the actual value is greater than the given one.isGreaterThanOrEqualTo
(A other) 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.isLessThanOrEqualTo
(A other) Verifies that the actual value is less than or equal to the given one.
-
Method Details
-
isLessThan
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 isnull
.AssertionError
- if the actual value is equal to or greater than the given one.
-
isLessThanOrEqualTo
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 isnull
.AssertionError
- if the actual value is greater than the given one.
-
isGreaterThan
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 isnull
.AssertionError
- if the actual value is equal to or less than the given one.
-
isGreaterThanOrEqualTo
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 isnull
.AssertionError
- if the actual value is less than the given one.
-