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
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedRealNumbers(ComparisonStrategy comparisonStrategy) -
Method Summary
Modifier and TypeMethodDescriptionprotected BigDecimalabsBigDecimalDiff(NUMBER number1, NUMBER number2) voidassertIsFinite(AssertionInfo info, NUMBER actual) voidassertIsInfinite(AssertionInfo info, NUMBER actual) voidassertIsNaN(AssertionInfo info, NUMBER actual) Verifies that the actual value is equal toNaN.
It does not rely on the custom comparisonStrategy (if one is set).voidassertIsNotFinite(AssertionInfo info, NUMBER actual) voidassertIsNotInfinite(AssertionInfo info, NUMBER actual) voidassertIsNotNaN(AssertionInfo info, NUMBER actual) Verifies that the actual value is not equal toNaN.protected abstract booleanprotected booleanisGreaterThan(NUMBER value, NUMBER other) protected abstract booleanisInfinite(NUMBER value) protected abstract booleanbooleanisNanOrInfinite(NUMBER value) Returns true is if the given value is Nan or Infinite, false otherwise.protected abstract booleanisNotFinite(NUMBER value) protected abstract booleanisNotInfinite(NUMBER value) protected abstract NUMBERNaN()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, zeroMethods inherited from class org.assertj.core.internal.Comparables
areEqual, assertEqual, assertEqualByComparison, assertGreaterThan, assertGreaterThanOrEqualTo, assertIsAfter, assertIsAfterOrEqualTo, assertIsBefore, assertIsBeforeOrEqualTo, assertIsBetween, assertLessThan, assertLessThanOrEqualTo, assertNotEqual, assertNotEqualByComparison, assertNotNull, equals, getComparator, hashCode, toString
-
Constructor Details
-
RealNumbers
protected RealNumbers() -
RealNumbers
-
-
Method Details
-
assertIsNaN
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.
-
absBigDecimalDiff
-
NaN
-
assertIsNotNaN
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
- Specified by:
isGreaterThanin classNumbers<NUMBER extends Number & Comparable<NUMBER>>
-
assertIsFinite
-
isFinite
-
assertIsNotFinite
-
isNotFinite
-
assertIsInfinite
-
isInfinite
-
assertIsNotInfinite
-
isNanOrInfinite
Returns true is if the given value is Nan or Infinite, false otherwise.- Parameters:
value- the value to check- Returns:
- true is if the given value is Nan or Infinite, false otherwise.
-
isNaN
-
isNotInfinite
-