Package org.fest.assertions.core
Interface ComparableAssert<S,A extends java.lang.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 java.lang.Comparable<? super A>>
Assertion methods applicable to
s.Comparable
- Author:
- Alex Ruiz, Ted M. Young
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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:
java.lang.AssertionError
- if the actual value isnull
.java.lang.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:
java.lang.AssertionError
- if the actual value isnull
.java.lang.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:
java.lang.AssertionError
- if the actual value isnull
.java.lang.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:
java.lang.AssertionError
- if the actual value isnull
.java.lang.AssertionError
- if the actual value is less than the given one.
-
-