public final class NumericChecks extends Object
| Modifier and Type | Method and Description |
|---|---|
static Check<BigDecimal> |
closeTo(BigDecimal expectedValue,
BigDecimal precision)
Check, that a BigDecimal number is close enough to the expected value, given the explicit tolerance.
|
static Check<Double> |
closeTo(double expectedValue,
double precision)
Check, that a double number is close enough to the expected value, given the explicit tolerance.
|
static Check<Float> |
closeTo(float expectedValue,
float precision)
Check, that a float number is close enough to the expected value, given the explicit tolerance.
|
static Check<BigDecimal> |
equalTo(BigDecimal expectedValue)
Specific overloaded method for "tolerant" equalTo implementation for BigDecimal real number values.
|
static Check<Double> |
equalTo(Double expectedValue)
Specific overloaded method for "tolerant" equalTo implementation for Double floating point values.
|
static Check<Float> |
equalTo(Float expectedValue)
Specific overloaded method for "tolerant" equalTo implementation for Float floating point values.
|
static Check<String> |
parseBigDecimal(Check<? super BigDecimal> check) |
static Check<String> |
parseBigInt(Check<? super BigInteger> check) |
static Check<String> |
parseBoolean(Boolean expectedValue) |
static Check<String> |
parseBoolean(Check<? super Boolean> check) |
static Check<String> |
parseByte(byte expectedValue) |
static Check<String> |
parseByte(Byte expectedValue) |
static Check<String> |
parseByte(Check<? super Byte> check) |
static Check<String> |
parseDouble(double expectedValue)
Check of the string containing double number implemented by composition of parsing double from string and
expected Double value.
|
static Check<String> |
parseDouble(Double expectedValue)
Check of the string containing double number implemented by composition of parsing double from string and
expected Double value.
|
static Check<String> |
parseDouble(Check<? super Double> check)
Check of the string containing double number implemented by composition of parsing double from string and
application of check of the Double value.
|
static Check<String> |
parseFloat(float expectedValue) |
static Check<String> |
parseFloat(Float expectedValue) |
static Check<String> |
parseFloat(Check<? super Float> check) |
static Check<String> |
parseInt(Check<? super Integer> check) |
static Check<String> |
parseInt(int expectedValue) |
static Check<String> |
parseInt(Integer expectedValue) |
static Check<String> |
parseLong(Check<? super Long> check) |
static Check<String> |
parseLong(long expectedValue) |
static Check<String> |
parseLong(Long expectedValue) |
static Check<String> |
parseShort(Check<? super Short> check) |
static Check<String> |
parseShort(short expectedValue) |
static Check<String> |
parseShort(Short expectedValue) |
public static Check<Double> closeTo(double expectedValue, double precision)
expectedValue - Expected value.precision - Tolerance, which is still accepted as difference from the expected value.public static Check<Float> closeTo(float expectedValue, float precision)
expectedValue - Expected value.precision - Tolerance, which is still accepted as difference from the expected value.public static Check<BigDecimal> closeTo(BigDecimal expectedValue, BigDecimal precision)
expectedValue - Expected value.precision - Tolerance, which is still accepted as difference from the expected value.public static Check<Double> equalTo(Double expectedValue)
expectedValue - Expected value, from which the actual shouldn't differ more, than by the default tolerance.closeTo(double, double),
DEFAULT_TOLERANCEpublic static Check<Float> equalTo(Float expectedValue)
expectedValue - Expected value, from which the actual shouldn't differ more, than by the default tolerance.closeTo(float, float),
DEFAULT_TOLERANCEpublic static Check<BigDecimal> equalTo(BigDecimal expectedValue)
expectedValue - Expected value, from which the actual shouldn't differ more, than by the default tolerance.closeTo(BigDecimal, BigDecimal),
DEFAULT_TOLERANCEpublic static Check<String> parseDouble(Check<? super Double> check)
check - Check of the double value.public static Check<String> parseDouble(Double expectedValue)
expectedValue - Expected double value.public static Check<String> parseDouble(double expectedValue)
expectedValue - Expected double value.public static Check<String> parseBigDecimal(Check<? super BigDecimal> check)
public static Check<String> parseBigInt(Check<? super BigInteger> check)
Copyright © 2021. All rights reserved.