public abstract class StructureNode extends SimpleNode
eval
method.Node.HookKey
Constructor and Description |
---|
StructureNode(int i) |
Modifier and Type | Method and Description |
---|---|
abstract java.lang.Object |
eval(Evaluator ev)
Evaluate the node
|
java.lang.String |
getName()
Return the name associated with the node (if any).
|
Operator |
getOperator()
Return the operator associated with a Node (if any)
|
PostfixMathCommandI |
getPFMC()
Return the pfmc of a node (if any)
|
java.lang.Object |
getValue()
Return the value associated with the node (if any).
|
Variable |
getVar()
Return the variable associated with a Node (if any)
|
protected static boolean |
testCondition(java.lang.Object val)
Convert a value to boolean, for use in condition tests
|
childIterator, children, childrenAccept, dump, getHook, getId, hookKeys, jjtAccept, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, removeHook, setHook, toString
public abstract java.lang.Object eval(Evaluator ev) throws EvaluationException
ev
- The evaluator the Evaluator.eval(com.singularsys.jep.parser.Node)
can be used to evaluate children.EvaluationException
- if evaluation cannot be performedpublic java.lang.String getName()
Node
public Operator getOperator()
Node
public PostfixMathCommandI getPFMC()
Node
public java.lang.Object getValue()
Node
public Variable getVar()
Node
protected static boolean testCondition(java.lang.Object val) throws EvaluationException
val
- value to test, a Number or BooleanEvaluationException
- if cannot be converted to a booleanCopyright © 2018 Singular Systems http://www.singularsys.com/jep