public abstract class Expression extends 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.
|
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.
|
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.
|
String |
toString()
Returns a string that represents the expression tree rooted at this node.
|
protected Expression parent
public abstract double eval(VarMap v, FuncMap f)
public boolean isDescendent(Expression x)
public Expression getParent()
protected void checkBeforeAccept(Expression x)
IllegalArgumentException
- If the specified expression is not accepted.public String[] getVariableNames()
public String[] getFunctionNames()
Copyright © 2024. All rights reserved.