public class StructuredEvaluator extends java.lang.Object implements Evaluator
Constructor and Description |
---|
StructuredEvaluator(Evaluator rootEval)
Create an evaluator for use with structured programming.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
eval(Node node)
Evaluate a node.
|
java.lang.Object |
evaluate(Node node)
Main entry point, evaluates a node and returns and object with the value of the node.
|
JepComponent |
getLightWeightInstance()
Gets a light-weight instance suitable for using in multiple threads.
|
void |
init(Jep jep)
Initialize the component.
|
public StructuredEvaluator(Evaluator rootEval)
rootEval
- the evaluator used for simple non-structured expressionsStructureNode
public java.lang.Object evaluate(Node node) throws EvaluationException
Evaluator
evaluate
in interface Evaluator
node
- node to evaluateEvaluationException
- if errors occur during evaluation;public java.lang.Object eval(Node node) throws EvaluationException
StructureNode
call its
StructureNode.eval(Evaluator)
method, otherwise use the
rootEvaluator.eval
in interface Evaluator
node
- node to evaluateEvaluationException
- if errors occur during evaluation;public JepComponent getLightWeightInstance()
JepComponent
getLightWeightInstance
in interface JepComponent
public void init(Jep jep)
JepComponent
init
in interface JepComponent
jep
- the current Jep instanceCopyright © 2018 Singular Systems http://www.singularsys.com/jep