public class ConstExprEvaluator
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected class |
ConstExprEvaluator.Node |
protected class |
ConstExprEvaluator.Operator |
Modifier and Type | Field and Description |
---|---|
protected static ConstExprEvaluator.Operator[] |
operators |
Constructor and Description |
---|
ConstExprEvaluator()
creates an empty ConstExprEvaluator.
|
ConstExprEvaluator(java.lang.String s)
creates a ConstExprEvaluator and assign the expression string.
|
Modifier and Type | Method and Description |
---|---|
protected ConstExprEvaluator.Operator[] |
getOperators() |
java.lang.Double |
getValue()
evaluates and returns the value of the expression
|
java.lang.Double |
getVariable(java.lang.String s)
gets the variable's value that was assigned previously
|
void |
reset()
resets the evaluator
|
void |
setExpression(java.lang.String s)
sets the expression
|
protected static ConstExprEvaluator.Operator[] operators
public ConstExprEvaluator()
public ConstExprEvaluator(java.lang.String s)
public void setExpression(java.lang.String s)
public void reset()
public java.lang.Double getValue()
public java.lang.Double getVariable(java.lang.String s)
protected ConstExprEvaluator.Operator[] getOperators()