public final class Constant extends Object implements Expression
| Constructor and Description |
|---|
Constant(BigDecimal value) |
| Modifier and Type | Method and Description |
|---|---|
BigDecimal |
evaluate(MathContext mathContext)
Evaluates the expression to a BigDecimal number.
|
boolean |
isConstant()
Determines the this expression is constant
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitevaluate, getMathContext, simplifypublic Constant(BigDecimal value)
public BigDecimal evaluate(MathContext mathContext)
Expressionevaluate in interface ExpressionmathContext - Use this math context during calculation instead of the one provided during parsing. Does not
affect already simplified subexpressions.public boolean isConstant()
ExpressionisConstant in interface ExpressionCopyright © 2019. All rights reserved.