Package org.fest.assertions.internal
Class RealNumbers<NUMBER extends java.lang.Comparable<NUMBER>>
- java.lang.Object
-
- org.fest.assertions.internal.Comparables
-
- org.fest.assertions.internal.Numbers<NUMBER>
-
- org.fest.assertions.internal.RealNumbers<NUMBER>
-
-
Constructor Summary
Constructors Constructor Description RealNumbers()
RealNumbers(ComparisonStrategy comparisonStrategy)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
assertIsNaN(AssertionInfo info, NUMBER actual)
Verifies that the actual value is equal toNaN
.
It does not rely on the custom comparisonStrategy (if one is set).void
assertIsNotNaN(AssertionInfo info, NUMBER actual)
Verifies that the actual value is not equal toNaN
.protected abstract boolean
isEqualTo(NUMBER actual, NUMBER expected, Offset<?> offset)
Returns true if the two floats parameter are equal within a positive offset, false otherwise.
It does not rely on the custom comparisonStrategy (if one is set) because using an offset is already a specific comparison strategy.protected abstract NUMBER
NaN()
-
Methods inherited from class org.fest.assertions.internal.Numbers
assertIsNegative, assertIsNotNegative, assertIsNotPositive, assertIsNotZero, assertIsPositive, assertIsZero, zero
-
Methods inherited from class org.fest.assertions.internal.Comparables
areEqual, assertEqual, assertEqualByComparison, assertGreaterThan, assertGreaterThanOrEqualTo, assertLessThan, assertLessThanOrEqualTo, assertNotEqual, assertNotEqualByComparison, assertNotNull, getComparator, instance
-
-
-
-
Constructor Detail
-
RealNumbers
public RealNumbers()
-
RealNumbers
public RealNumbers(ComparisonStrategy comparisonStrategy)
-
-
Method Detail
-
assertIsNaN
public void assertIsNaN(AssertionInfo info, NUMBER actual)
Verifies that the actual value is equal toNaN
.
It does not rely on the custom comparisonStrategy (if one is set).- Parameters:
info
- contains information about the assertion.actual
- the actual value.- Throws:
java.lang.AssertionError
- if the actual value is not equal toNaN
.
-
NaN
protected abstract NUMBER NaN()
-
assertIsNotNaN
public void assertIsNotNaN(AssertionInfo info, NUMBER actual)
Verifies that the actual value is not equal toNaN
.- Parameters:
info
- contains information about the assertion.actual
- the actual value.- Throws:
java.lang.AssertionError
- if the actual value is equal toNaN
.
-
isEqualTo
protected abstract boolean isEqualTo(NUMBER actual, NUMBER expected, Offset<?> offset)
Returns true if the two floats parameter are equal within a positive offset, false otherwise.
It does not rely on the custom comparisonStrategy (if one is set) because using an offset is already a specific comparison strategy.- Parameters:
actual
- the actual value.expected
- the expected value.offset
- the given positive offset.- Returns:
- true if the two floats parameter are equal within a positive offset, false otherwise.
-
-