public class NullWrappedPfmc extends PostfixMathCommand implements NullWrappedFunctionI
Modifier and Type | Field and Description |
---|---|
protected PostfixMathCommand |
fun |
curNumberOfParameters, name, NaN, numberOfParameters
Constructor and Description |
---|
NullWrappedPfmc(PostfixMathCommand fun) |
Modifier and Type | Method and Description |
---|---|
boolean |
checkNumberOfParameters(int n)
Checks the number of parameters of the function.
|
int |
getNumberOfParameters()
Return the required number of parameters.
|
PostfixMathCommandI |
getRoot()
Get to function which this function wraps.
|
void |
run(java.util.Stack<java.lang.Object> stack)
Throws an exception because this method should never be called under
normal circumstances.
|
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
|
protected PostfixMathCommand fun
public NullWrappedPfmc(PostfixMathCommand fun)
fun
- public 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 functionpublic void setName(java.lang.String name)
PostfixMathCommandI
setName
in interface PostfixMathCommandI
setName
in class PostfixMathCommand
name
- the function namepublic PostfixMathCommandI getRoot()
NullWrappedFunctionI
getRoot
in interface NullWrappedFunctionI
public void run(java.util.Stack<java.lang.Object> stack) throws EvaluationException
PostfixMathCommand
run
in interface PostfixMathCommandI
run
in class PostfixMathCommand
stack
- arguments for functionEvaluationException
- if function cannot be evaluatedCopyright © 2018 Singular Systems http://www.singularsys.com/jep