|
http://www.eteks.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.eteks.parser.node.FunctionNode
Node matching a function call.
| Constructor Summary | |
FunctionNode(Function function,
boolean recursiveCall)
Creates the node of a function. |
|
| Method Summary | |
void |
addParameter(ExpressionNode parameter)
Adds the node parameter to the list of parameters or operands
of this node. |
double |
computeExpression(double[] parametersValue)
Returns the double value of this function call. |
java.lang.Object |
computeExpression(Interpreter interpreter,
java.lang.Object[] parametersValue)
Returns the value returned by the getFunctionValue () method
of interpreter with the instance of Function of this node
and the computed value of its parameters as parameters of getFunctionValue (). |
Function |
getFunction()
Returns the function of this node. |
ExpressionNode |
getParameter(int index)
Returns the expression at index index that will be passed
as parameter to this function. |
int |
getParameterCount()
Returns the current count of parameters or operands stored by this node. |
boolean |
isRecursiveCall()
Returns true if this is a recursive call. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FunctionNode(Function function,
boolean recursiveCall)
function - a previously compiled function or any instance of a Java written
class implementing the Function interface.recursiveCall - true if this is a recursive call.| Method Detail |
public Function getFunction()
Function instance.public boolean isRecursiveCall()
true if this is a recursive call.true or false.public void addParameter(ExpressionNode parameter)
ParameterizedNodeparameter to the list of parameters or operands
of this node.addParameter in interface ParameterizedNodecom.eteks.parser.node.ParameterizedNodeparameter - the node of an expression used as parameter or operand.public int getParameterCount()
ParameterizedNodegetParameterCount in interface ParameterizedNodecom.eteks.parser.node.ParameterizedNodepublic ExpressionNode getParameter(int index)
index that will be passed
as parameter to this function.index.
public java.lang.Object computeExpression(Interpreter interpreter,
java.lang.Object[] parametersValue)
getFunctionValue () method
of interpreter with the instance of Function of this node
and the computed value of its parameters as parameters of getFunctionValue ().computeExpression in interface ExpressionNodeinterpreter - runtime interpreter.parametersValue - the value of parameters passed to compute a compiled function.Interpreter.getFunctionValue(com.eteks.parser.Function, java.lang.Object[], boolean)public double computeExpression(double[] parametersValue)
CompiledFunction, an instance of DoubleInterpreter
is passed to the computeFunction () of the function to
compute its value.computeExpression in interface ExpressionNodeinterpreter - runtime interpreter.parametersValue - the value of parameters passed to compute a compiled function.
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||