public abstract class RealNumbers<NUMBER extends Number & Comparable<NUMBER>> extends Numbers<NUMBER>
Constructor and Description |
---|
RealNumbers() |
RealNumbers(ComparisonStrategy comparisonStrategy) |
Modifier and Type | Method and Description |
---|---|
void |
assertIsNaN(AssertionInfo info,
NUMBER actual)
Verifies that the actual value is equal to
NaN .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 to
NaN . |
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() |
absDiff, assertIsBetween, assertIsCloseTo, assertIsCloseToPercentage, assertIsNegative, assertIsNotNegative, assertIsNotPositive, assertIsNotZero, assertIsPositive, assertIsStrictlyBetween, assertIsZero, isCloseToPercentageCommonChecks, zero
areEqual, assertEqual, assertEqualByComparison, assertGreaterThan, assertGreaterThanOrEqualTo, assertIsBetween, assertLessThan, assertLessThanOrEqualTo, assertNotEqual, assertNotEqualByComparison, assertNotNull, getComparator, instance
public RealNumbers()
public RealNumbers(ComparisonStrategy comparisonStrategy)
public void assertIsNaN(AssertionInfo info, NUMBER actual)
NaN
.info
- contains information about the assertion.actual
- the actual value.AssertionError
- if the actual value is not equal to NaN
.protected abstract NUMBER NaN()
public void assertIsNotNaN(AssertionInfo info, NUMBER actual)
NaN
.info
- contains information about the assertion.actual
- the actual value.AssertionError
- if the actual value is equal to NaN
.protected abstract boolean isEqualTo(NUMBER actual, NUMBER expected, Offset<?> offset)
actual
- the actual value.expected
- the expected value.offset
- the given positive offset.Copyright © 2013-2015 AssertJ. All Rights Reserved.