public class NullWrappedNary extends NaryFunction implements NullWrappedFunctionI
curNumberOfParameters, name, NaN, numberOfParameters
Constructor and Description |
---|
NullWrappedNary(NaryFunction fun) |
Modifier and Type | Method and Description |
---|---|
boolean |
checkNumberOfParameters(int n)
Checks the number of parameters of the function.
|
java.lang.Object |
eval(java.lang.Object[] args)
Evaluate the function
|
int |
getNumberOfParameters()
Return the required number of parameters.
|
PostfixMathCommandI |
getRoot()
Get to function which this function wraps.
|
void |
setCurNumberOfParameters(int n)
Sets the number of current number of parameters used in the next call
of run().
|
void |
setName(java.lang.String name)
Sets the name of the function used for error messages
|
run
public NullWrappedNary(NaryFunction fun)
fun
- public PostfixMathCommandI getRoot()
NullWrappedFunctionI
getRoot
in interface NullWrappedFunctionI
public java.lang.Object eval(java.lang.Object[] args) throws EvaluationException
NaryFunction
eval
in class NaryFunction
args
- arguments to the functionEvaluationException
- if the calculation cannot be performedpublic void setName(java.lang.String name)
PostfixMathCommandI
setName
in interface PostfixMathCommandI
setName
in class PostfixMathCommand
name
- the function namepublic boolean checkNumberOfParameters(int n)
PostfixMathCommand
checkNumberOfParameters
in interface PostfixMathCommandI
checkNumberOfParameters
in class PostfixMathCommand
n
- number of parameters function will be called with.public int getNumberOfParameters()
PostfixMathCommand
getNumberOfParameters
in interface PostfixMathCommandI
getNumberOfParameters
in class PostfixMathCommand
public void setCurNumberOfParameters(int n)
PostfixMathCommand
setCurNumberOfParameters
in interface PostfixMathCommandI
setCurNumberOfParameters
in class PostfixMathCommand
n
- number of parameter for next call of functionCopyright © 2018 Singular Systems http://www.singularsys.com/jep