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
|
runpublic NullWrappedNary(NaryFunction fun)
fun - public PostfixMathCommandI getRoot()
NullWrappedFunctionIgetRoot in interface NullWrappedFunctionIpublic java.lang.Object eval(java.lang.Object[] args)
throws EvaluationException
NaryFunctioneval in class NaryFunctionargs - arguments to the functionEvaluationException - if the calculation cannot be performedpublic void setName(java.lang.String name)
PostfixMathCommandIsetName in interface PostfixMathCommandIsetName in class PostfixMathCommandname - the function namepublic boolean checkNumberOfParameters(int n)
PostfixMathCommandcheckNumberOfParameters in interface PostfixMathCommandIcheckNumberOfParameters in class PostfixMathCommandn - number of parameters function will be called with.public int getNumberOfParameters()
PostfixMathCommandgetNumberOfParameters in interface PostfixMathCommandIgetNumberOfParameters in class PostfixMathCommandpublic void setCurNumberOfParameters(int n)
PostfixMathCommandsetCurNumberOfParameters in interface PostfixMathCommandIsetCurNumberOfParameters in class PostfixMathCommandn - number of parameter for next call of functionCopyright © 2018 Singular Systems http://www.singularsys.com/jep