Package | Description |
---|---|
java.math |
Modifier and Type | Method and Description |
---|---|
RoundingMode |
MathContext.getRoundingMode()
Returns the rounding mode.
|
static RoundingMode |
RoundingMode.valueOf(int mode)
Converts rounding mode constants from class
BigDecimal into RoundingMode values. |
static RoundingMode |
RoundingMode.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RoundingMode[] |
RoundingMode.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
BigDecimal |
BigDecimal.divide(BigDecimal divisor,
int scale,
RoundingMode roundingMode)
Returns a new
BigDecimal whose value is this / divisor . |
BigDecimal |
BigDecimal.divide(BigDecimal divisor,
RoundingMode roundingMode)
Returns a new
BigDecimal whose value is this / divisor . |
BigDecimal |
BigDecimal.setScale(int newScale,
RoundingMode roundingMode)
Returns a new
BigDecimal instance with the specified scale. |
Constructor and Description |
---|
MathContext(int precision,
RoundingMode roundingMode)
Constructs a new
MathContext with the specified precision and with
the specified rounding mode. |
Copyright © 2018. All rights reserved.