public class LoopNode extends StructureNode
for
or while
loop.Modifier and Type | Class and Description |
---|---|
static class |
LoopNode.ControlValues
Special values to indicate break and continue statements
Used by
ControlRule and ControlNode . |
Node.HookKey
Constructor and Description |
---|
LoopNode(Node initilise,
Node condition,
Node increment,
Node body)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
eval(Evaluator ev)
Evaluate the Loop.
|
Node |
getBody() |
Node |
getCondition() |
Node |
getIncrement() |
Node |
getInitilise() |
java.lang.String |
toString() |
getName, getOperator, getPFMC, getValue, getVar, testCondition
childIterator, children, childrenAccept, dump, getHook, getId, hookKeys, jjtAccept, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, removeHook, setHook, toString
public LoopNode(Node initilise, Node condition, Node increment, Node body)
initilise
- node evaluate at start of loop, can be nullcondition
- evaluated and tested before each evaluation, can be nullincrement
- evaluated after each iteration, can be nullbody
- evaluated once per iterationpublic Node getInitilise()
public Node getCondition()
public Node getIncrement()
public Node getBody()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object eval(Evaluator ev) throws EvaluationException
eval
in class StructureNode
ev
- The evaluator the Evaluator.eval(com.singularsys.jep.parser.Node)
can be used to evaluate children.EvaluationException
- if evaluation cannot be performedCopyright © 2018 Singular Systems http://www.singularsys.com/jep