Package org.assertj.core.internal
Class RealNumbers<NUMBER extends Number & Comparable<NUMBER>>
- java.lang.Object
-
- org.assertj.core.internal.Comparables
-
- org.assertj.core.internal.Numbers<NUMBER>
-
- org.assertj.core.internal.RealNumbers<NUMBER>
-
public abstract class RealNumbers<NUMBER extends Number & Comparable<NUMBER>> extends Numbers<NUMBER>
Base class of reusable assertions for real numbers (float and double).- Author:
- Joel Costigliola
-
-
Field Summary
-
Fields inherited from class org.assertj.core.internal.Comparables
failures
-
-
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 boolean
isGreaterThan(NUMBER value, NUMBER other)
protected abstract NUMBER
NaN()
-
Methods inherited from class org.assertj.core.internal.Numbers
absDiff, areEqual, assertIsBetween, assertIsCloseTo, assertIsCloseToPercentage, assertIsNegative, assertIsNotCloseTo, assertIsNotCloseToPercentage, assertIsNotNegative, assertIsNotPositive, assertIsNotZero, assertIsOne, assertIsPositive, assertIsStrictlyBetween, assertIsZero, isGreaterThanOrEqualTo, one, zero
-
Methods inherited from class org.assertj.core.internal.Comparables
areEqual, assertEqual, assertEqualByComparison, assertGreaterThan, assertGreaterThanOrEqualTo, assertIsAfter, assertIsAfterOrEqualTo, assertIsBefore, assertIsBeforeOrEqualTo, assertIsBetween, assertLessThan, assertLessThanOrEqualTo, assertNotEqual, assertNotEqualByComparison, assertNotNull, checkBoundsValidity, equals, getComparator, hashCode, resetFailures, setFailures, toString
-
-
-
-
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:
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:
AssertionError
- if the actual value is equal toNaN
.
-
isGreaterThan
protected boolean isGreaterThan(NUMBER value, NUMBER other)
- Specified by:
isGreaterThan
in classNumbers<NUMBER extends Number & Comparable<NUMBER>>
-
-