public final class FunctionCall extends AbstractExpression
| Constructor and Description |
|---|
FunctionCall(MathContext mathContext)
Create a function call expression.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addParameter(Expression expression)
Adds an expression as parameter.
|
BigDecimal |
evaluate(MathContext mathContext)
Evaluates the expression to a BigDecimal number.
|
List<Expression> |
getParameters()
Returns all parameters added so far.
|
void |
setFunction(Function function)
Sets the function to evaluate.
|
Expression |
simplify(MathContext mathContext)
Returns a simplified version of this expression.
|
getMathContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitevaluate, isConstantpublic FunctionCall(MathContext mathContext)
mathContext - the math contextpublic BigDecimal evaluate(MathContext mathContext)
ExpressionmathContext - Use this math context during calculation instead of the one provided during parsing. Does not
affect already simplified subexpressions.public Expression simplify(MathContext mathContext)
ExpressionmathContext - Match context used during simplification.public void setFunction(Function function)
function - the function to evaluatepublic void addParameter(Expression expression)
expression - the parameter to addpublic List<Expression> getParameters()
Copyright © 2019. All rights reserved.