com.singularsys.jep
Interface PostfixMathCommandI
- All Superinterfaces:
- java.io.Serializable
- All Known Implementing Classes:
- Abs, AbstractInc, Add, ArcCosine, ArcCosineH, ArcSine, ArcSineH, ArcTangent, ArcTangent2, ArcTanH, Arg, ArrayFunctionBase, Assign, Average, BigDecAdd, BigDecDiv, BigDecMod, BigDecMul, BigDecNegate, BigDecPow, BigDecRelational, BigDecSub, BinaryFunction, Binomial, BitAnd, BitComp, BitOr, BitXor, Case, Ceil, Comparative, ComplexPFMC, Concat, Conjugate, ConstantFunction, Cosecant, Cosine, CosineH, Cotangent, Cross, Divide, Dot, Ele, Exp, ExtendedOperatorSet.Factorial, Floor, FromBase, Identity, If, Imaginary, IsInfinite, IsNaN, IsNull, IsType, LazyLogical, Left, Length, List, Logarithm, LogBase2, Logical, LogTwoArg, LowerCase, LShift, MacroFunction, Mid, MinMax, Modulus, Multiply, NaryBinaryFunction, NaryFunction, NaturalLogarithm, Not, NullLazyLogical, NullSafeEquals, NullWrappedIf, NullWrapperBinary, NullWrapperNary, NullWrapperNaryBinary, NullWrapperPfmc, NullWrapperUnary, OpEquals, Polar, PostDec, PostfixMathCommand, PostInc, Power, PreDec, PreInc, Random, Real, Remainder, Right, RInt, Round, RoundSF, RShift, Secant, Signum, Sine, SineH, SquareRoot, Str, StrictNaturalLogarithm, Substring, Subtract, Sum, Switch, SwitchDefault, Tangent, TanH, TernaryConditional, ToBase, Trim, UMinus, UnaryFunction, UpperCase, URShift, VSum
public interface PostfixMathCommandI
- extends java.io.Serializable
All function classes must implement this interface to ensure that the run()
method is implemented.
Method Summary |
boolean |
checkNumberOfParameters(int n)
Checks the number of parameters of the function. |
java.lang.String |
getName()
|
int |
getNumberOfParameters()
Returns the number of required parameters, or -1 if any number of
parameters is allowed. |
void |
run(java.util.Stack<java.lang.Object> aStack)
Run the function on the stack. |
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)
|
run
void run(java.util.Stack<java.lang.Object> aStack)
throws EvaluationException
- Run the function on the stack. Pops the arguments from the stack, and
pushes the result on the top of the stack.
- Throws:
EvaluationException
getNumberOfParameters
int getNumberOfParameters()
- Returns the number of required parameters, or -1 if any number of
parameters is allowed.
setCurNumberOfParameters
void setCurNumberOfParameters(int n)
- Sets the number of current number of parameters used in the next call
of run(). This method is only called when the reqNumberOfParameters is
-1.
checkNumberOfParameters
boolean checkNumberOfParameters(int n)
- Checks the number of parameters of the function.
This method is called during the parsing of the equation to check syntax.
Functions which set numberOfParameter=-1 should overwrite this method.
- Parameters:
n
- number of parameters function will be called with.
- Returns:
- False if an illegal number of parameters is supplied, true otherwise.
getName
java.lang.String getName()
setName
void setName(java.lang.String name)
Copyright © 2010 Singular Systems http://www.singularsys.com/jep