Class SequenceNode
- java.lang.Object
-
- com.singularsys.jep.parser.SimpleNode
-
- com.singularsys.extensions.structure.StructureNode
-
- com.singularsys.extensions.structure.SequenceNode
-
- All Implemented Interfaces:
Node
public class SequenceNode extends StructureNode
A node representing a sequence of expressions.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.singularsys.jep.parser.Node
Node.HookKey
-
-
Constructor Summary
Constructors Constructor Description SequenceNode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Node n)
Add the next node in the sequence.java.lang.Object
eval(Evaluator ev)
Will evaluate each of its children in turn.java.lang.String
toString()
-
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
-
add
public void add(Node n)
Add the next node in the sequence.- Parameters:
n
- node to add
-
eval
public java.lang.Object eval(Evaluator ev) throws EvaluationException
Will evaluate each of its children in turn. If Break or Continue is encounter the subsequent children are not evaluated.- Specified by:
eval
in classStructureNode
- Parameters:
ev
- The evaluator theEvaluator.eval(com.singularsys.jep.parser.Node)
can be used to evaluate children.- Returns:
- result of evaluation
- Throws:
EvaluationException
- if evaluation cannot be performed
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-