BigDecimal that is not covered by its built-in methods.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static double | roundToDouble(BigDecimal x, RoundingMode mode)
Returns |
| BigDecimalMath | back to summary |
|---|---|
| private BigDecimalMath() | |
| roundToDouble | back to summary |
|---|---|
| public static double roundToDouble(BigDecimal x, RoundingMode mode) Returns For the case of For the case of
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final BigDecimalMath. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv BigDecimal | minus(BigDecimal a, BigDecimal b)
Implements abstract com. |
| pack-priv double | roundToDoubleArbitrarily(BigDecimal bigDecimal)
Implements abstract com. |
| pack-priv int | sign(BigDecimal bigDecimal)
Implements abstract com. |
| pack-priv BigDecimal | toX(double d, RoundingMode mode)
Implements abstract com. |
| INSTANCE | back to summary |
|---|---|
| pack-priv static final BigDecimalMath. | |
| BigDecimalToDoubleRounder | back to summary |
|---|---|
| private BigDecimalToDoubleRounder() | |
| minus | back to summary |
|---|---|
| pack-priv BigDecimal minus(BigDecimal a, BigDecimal b) Implements abstract com. Doc from com. Returns a - b, guaranteed that both arguments are nonnegative.
| |
| roundToDoubleArbitrarily | back to summary |
|---|---|
| pack-priv double roundToDoubleArbitrarily(BigDecimal bigDecimal) Implements abstract com. Doc from com. 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.
| |
| sign | back to summary |
|---|---|
| pack-priv int sign(BigDecimal bigDecimal) Implements abstract com. Doc from com. Returns the sign of x: either -1, 0, or 1.
| |
| toX | back to summary |
|---|---|
| pack-priv BigDecimal toX(double d, RoundingMode mode) Implements abstract com. Doc from com. Returns d's value as an X, rounded with the specified mode.
| |