public interface Expression
Can be evaluated to return a BigDecimal value.
| Modifier and Type | Method and Description |
|---|---|
default BigDecimal |
evaluate()
Evaluates the expression to a BigDecimal number.
|
BigDecimal |
evaluate(MathContext mathContext)
Evaluates the expression to a BigDecimal number.
|
default MathContext |
getMathContext()
Can return the default math context to use during evaluation.
|
default boolean |
isConstant()
Determines the this expression is constant
|
default Expression |
simplify(MathContext mathContext)
Returns a simplified version of this expression.
|
default BigDecimal evaluate()
BigDecimal evaluate(MathContext mathContext)
mathContext - Use this math context during calculation instead of the one provided during parsing. Does not
affect already simplified subexpressions.default Expression simplify(MathContext mathContext)
mathContext - Match context used during simplification.default boolean isConstant()
default MathContext getMathContext()
Copyright © 2019. All rights reserved.