| Package | Description |
|---|---|
| org.jdice.calc | |
| org.jdice.calc.operation |
| Modifier and Type | Field and Description |
|---|---|
static Rounding |
Properties.DEFAULT_ROUNDING_MODE |
| Modifier and Type | Method and Description |
|---|---|
static Rounding |
Properties.getInheritedRoundingMode(AbstractCalculator calc,
Num value)
If
Num don't define scale then use scale from AbstractCalculator instance. |
Rounding |
Num.getRoundingMode()
Gets the rounding mode for division operations The default is
RoundingMode.HALF_UP |
Rounding |
Properties.getRoundingMode() |
Rounding |
AbstractCalculator.getRoundingMode()
Get rounding mode used throughout expression
|
static Rounding |
Rounding.getRoundingMode(java.lang.String roundingMode) |
static Rounding |
Rounding.valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Rounding[] |
Rounding.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
| Modifier and Type | Method and Description |
|---|---|
java.math.BigDecimal |
Num.get(int scale,
Rounding roundingMode)
Return BigDecimal in defined scale with specified rounding mode
|
boolean |
Num.isEqual(java.lang.Object value,
int scale,
Rounding rounding)
Convert value to
Num, and scale both value before
comparing them. |
Num |
Num.setRoundingMode(Rounding roundingMode)
Sets the rounding mode for decimal divisions.
|
Properties |
Properties.setRoundingMode(Rounding roundingMode) |
CALC |
AbstractCalculator.setRoundingMode(Rounding roundingMode)
Set rounding mode for entire expression
|
Num |
Num.setScale(int scale,
Rounding roundingMode)
Sets the scale and rounding mode for division operations.
|
java.math.BigDecimal |
Num.toBigDecimal(java.lang.Integer scale,
Rounding rounding,
boolean stripTrailingZeros)
Return BigDecimal
|
| Modifier and Type | Method and Description |
|---|---|
Num |
ModOperator.calc(Num value1,
Num value2,
java.lang.Integer scale,
Rounding roundingMode) |
Num |
DivOperator.calc(Num value1,
Num value2,
java.lang.Integer scale,
Rounding roundingMode) |
JCalc API 2014 Davor Sauer - Apache 2.0