|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.singularsys.jep.standard.FastEvaluator
public class FastEvaluator
Constructor Summary | |
---|---|
FastEvaluator()
|
Method Summary | |
---|---|
java.lang.Object |
eval(Node node)
Evaluates a sub expression. |
java.lang.Object |
evaluate(Node node)
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. |
boolean |
isTrapInfinity()
|
boolean |
isTrapNaN()
|
boolean |
isTrapNullValues()
Whether null values for variables are trapped. |
protected java.lang.Object |
nodeAccept(Node node)
|
void |
setTrapInfinity(boolean trapInfinity)
|
void |
setTrapNaN(boolean trapNaN)
|
void |
setTrapNullValues(boolean trapNullValues)
Sets whether null values for variables are trapped. |
java.lang.Object |
visit(ASTConstant node,
java.lang.Object data)
|
java.lang.Object |
visit(ASTFunNode node,
java.lang.Object data)
|
java.lang.Object |
visit(ASTOpNode node,
java.lang.Object data)
|
java.lang.Object |
visit(ASTVarNode node,
java.lang.Object data)
|
java.lang.Object |
visitConstant(Node node)
|
protected java.lang.Object |
visitFun(Node node)
Visits a function/operator node. |
java.lang.Object |
visitVar(Node node)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FastEvaluator()
Method Detail |
---|
public void init(Jep jep)
JepComponent
init
in interface JepComponent
jep
- the current Jep instancepublic java.lang.Object eval(Node node) throws EvaluationException
Evaluator
eval
in interface Evaluator
EvaluationException
- if errors occur during evaluation;public java.lang.Object evaluate(Node node) throws EvaluationException
Evaluator
evaluate
in interface Evaluator
EvaluationException
- if errors occur during evaluation;protected java.lang.Object nodeAccept(Node node) throws EvaluationException
EvaluationException
public java.lang.Object visit(ASTConstant node, java.lang.Object data) throws EvaluationException
visit
in interface ParserVisitor
EvaluationException
public java.lang.Object visitConstant(Node node) throws EvaluationException
EvaluationException
public java.lang.Object visit(ASTVarNode node, java.lang.Object data) throws EvaluationException
visit
in interface ParserVisitor
EvaluationException
public java.lang.Object visitVar(Node node) throws EvaluationException
EvaluationException
public java.lang.Object visit(ASTFunNode node, java.lang.Object data) throws EvaluationException
visit
in interface ParserVisitor
EvaluationException
public java.lang.Object visit(ASTOpNode node, java.lang.Object data) throws EvaluationException
visit
in interface ParserVisitor
EvaluationException
protected java.lang.Object visitFun(Node node) throws EvaluationException
node
-
EvaluationException
public boolean isTrapNullValues()
public void setTrapNullValues(boolean trapNullValues)
trapNullValues
- public boolean isTrapNaN()
public void setTrapNaN(boolean trapNaN)
public boolean isTrapInfinity()
public void setTrapInfinity(boolean trapInfinity)
public JepComponent getLightWeightInstance()
JepComponent
getLightWeightInstance
in interface JepComponent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |