org.grinvin.expr
Class Compound
java.lang.Object
org.grinvin.expr.Compound
- Expression
public class Compound
extends java.lang.Object
Compound expression, i.e., an expression containing one or several 'sub-expressions'.
Compound
public Compound(Operator operator,
Expression arg)
Create an expression which applies the given operator to the
given argument.
Compound
public Compound(Operator operator,
Expression arg1,
Expression arg2)
Create an expression which applies the given operator to the
two given arguments.
Compound
public Compound(Operator operator,
Expression[] children)
Create an expression which applies the given operator to the
given array of arguments.
getChild
public Expression getChild(int index)
Return the child with the given index.
getNumberOfChildren
public int getNumberOfChildren()
The number of argument children for this compound expression.
getOperator
public Operator getOperator()
Get the operator for this expression.