public class AppliedExpression extends Object
SimulationParameters
need to be defined that are substituted into the expression and resolved for their values.| Constructor and Description |
|---|
AppliedExpression(String expression,
javax.measure.Unit<?> resultUnit)
Creates an expression from the given string.
|
| Modifier and Type | Method and Description |
|---|---|
void |
acceptValue(String parameter,
double value)
Replaces a value for the parameter with the given identifier.
|
javax.measure.Quantity<?> |
evaluate()
Evaluates the expression and returns the result.
|
String |
getExpressionString()
Returns the expression string.
|
Map<String,SimulationParameter> |
getParameters()
Returns the parameters of the expression.
|
void |
setParameter(SimulationParameter parameter)
Sets a parameter of the expression.
|
public AppliedExpression(String expression, javax.measure.Unit<?> resultUnit)
expression - The string that is converted into the expression;resultUnit - The unit resulting from the calculation.public Map<String,SimulationParameter> getParameters()
public void setParameter(SimulationParameter parameter)
parameter - A parameter that is substituted into the expressionpublic String getExpressionString()
public void acceptValue(String parameter, double value)
parameter - The parameter to set.value - The new value of the parameter.public javax.measure.Quantity<?> evaluate()
Copyright © 2018. All rights reserved.