Class IfNode
- java.lang.Object
-
- com.singularsys.jep.parser.SimpleNode
-
- com.singularsys.extensions.structure.StructureNode
-
- com.singularsys.extensions.structure.IfNode
-
- All Implemented Interfaces:
Node
public class IfNode extends StructureNode
A node representing an if statement.- Author:
- rich
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.singularsys.jep.parser.Node
Node.HookKey
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objecteval(Evaluator ev)Evaluate the statementNodegetCondition()NodegetFalseNode()NodegetTrueNode()java.lang.StringtoString()-
Methods inherited from class com.singularsys.extensions.structure.StructureNode
getName, getOperator, getPFMC, getValue, getVar, testCondition
-
Methods inherited from class com.singularsys.jep.parser.SimpleNode
childIterator, children, childrenAccept, dump, getHook, getId, hookKeys, jjtAccept, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, removeHook, setHook, toString
-
-
-
-
Method Detail
-
getCondition
public Node getCondition()
-
getFalseNode
public Node getFalseNode()
-
getTrueNode
public Node getTrueNode()
-
eval
public java.lang.Object eval(Evaluator ev) throws EvaluationException
Evaluate the statement- Specified by:
evalin classStructureNode- Parameters:
ev- The evaluator theEvaluator.eval(com.singularsys.jep.parser.Node)can be used to evaluate children.- Returns:
- result trueNode or falseNode or null if condition is true and falseNode is not specified.
- Throws:
EvaluationException- if evaluation cannot be performed
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-