public abstract class Expression
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected Expression |
parent |
| Constructor and Description |
|---|
Expression() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkBeforeAccept(Expression x)
Protected method used to verify that the specified expression can be included as a child
expression of this node.
|
abstract double |
eval(VarMap v,
FuncMap f)
Returns the result of evaluating the expression tree rooted at this node.
|
java.lang.String[] |
getFunctionNames()
Returns an array of exact length of the function names contained in the expression tree rooted at this node.
|
Expression |
getParent()
Returns the parent of this node.
|
private java.lang.String[] |
getTermNames(boolean varNames) |
private static void |
getTermNames(Expression x,
Bag b,
boolean varNames) |
java.lang.String[] |
getVariableNames()
Returns an array of exact length of the variable names contained in the expression tree rooted at this node.
|
boolean |
isDescendent(Expression x)
Returns true if this node is a descendent of the specified node, false otherwise.
|
java.lang.String |
toString()
Returns a string that represents the expression tree rooted at this node.
|
private static void |
toString(Expression x,
java.lang.StringBuffer sb) |
protected Expression parent
public abstract double eval(VarMap v, FuncMap f)
public boolean isDescendent(Expression x)
public Expression getParent()
protected void checkBeforeAccept(Expression x)
java.lang.IllegalArgumentException - If the specified expression is not accepted.public java.lang.String[] getVariableNames()
public java.lang.String[] getFunctionNames()
private java.lang.String[] getTermNames(boolean varNames)
private static void getTermNames(Expression x, Bag b, boolean varNames)
public java.lang.String toString()
toString in class java.lang.Objectprivate static void toString(Expression x, java.lang.StringBuffer sb)