public final class MathematicalContext extends Object
Modifier and Type | Field and Description |
---|---|
static MathContext |
DEFAULT_MATH_CONTEXT
A default context.
|
Constructor and Description |
---|
MathematicalContext()
Constructor using the default context.
|
Modifier and Type | Method and Description |
---|---|
MathContext |
getMathContext()
Provides the defined mathematical context.
|
void |
setMathContext(MathContext value)
Sets the matthematical context
|
void |
setPrecision(int precision)
Set precision, see
MathContext.getPrecision() . |
void |
setRoundingMode(RoundingMode mode)
Sets the rounding mode for this context.
|
void |
useDefault()
Reset to default:
DEFAULT_MATH_CONTEXT . |
public static final MathContext DEFAULT_MATH_CONTEXT
public MathematicalContext()
@NotNull public MathContext getMathContext()
public void setMathContext(@NotNull MathContext value)
value
- The context to use.public void setPrecision(int precision)
MathContext.getPrecision()
.precision
- a value between 0 and Integer.MAX_VALUE
public void setRoundingMode(@NotNull RoundingMode mode)
mode
- The rounding mode.public void useDefault()
DEFAULT_MATH_CONTEXT
.Copyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210