private static class BigDecimalMath.BigDecimalToDoubleRounder extends ToDoubleRounder<java.math.BigDecimal>
Modifier and Type | Field and Description |
---|---|
(package private) static BigDecimalMath.BigDecimalToDoubleRounder |
INSTANCE |
Modifier | Constructor and Description |
---|---|
private |
BigDecimalToDoubleRounder() |
Modifier and Type | Method and Description |
---|---|
(package private) java.math.BigDecimal |
minus(java.math.BigDecimal a,
java.math.BigDecimal b)
Returns a - b, guaranteed that both arguments are nonnegative.
|
(package private) double |
roundToDoubleArbitrarily(java.math.BigDecimal bigDecimal)
Returns x rounded to either the greatest double less than or equal to the precise value of x,
or the least double greater than or equal to the precise value of x.
|
(package private) int |
sign(java.math.BigDecimal bigDecimal)
Returns the sign of x: either -1, 0, or 1.
|
(package private) java.math.BigDecimal |
toX(double d,
java.math.RoundingMode mode)
Returns d's value as an X, rounded with the specified mode.
|
roundToDouble
static final BigDecimalMath.BigDecimalToDoubleRounder INSTANCE
double roundToDoubleArbitrarily(java.math.BigDecimal bigDecimal)
ToDoubleRounder
roundToDoubleArbitrarily
in class ToDoubleRounder<java.math.BigDecimal>
int sign(java.math.BigDecimal bigDecimal)
ToDoubleRounder
sign
in class ToDoubleRounder<java.math.BigDecimal>
java.math.BigDecimal toX(double d, java.math.RoundingMode mode)
ToDoubleRounder
toX
in class ToDoubleRounder<java.math.BigDecimal>
java.math.BigDecimal minus(java.math.BigDecimal a, java.math.BigDecimal b)
ToDoubleRounder
minus
in class ToDoubleRounder<java.math.BigDecimal>