Package com.singularsys.jeptests.system
Class JepTest.MyNaryBinary
- java.lang.Object
-
- com.singularsys.jep.functions.PostfixMathCommand
-
- com.singularsys.jep.functions.NaryBinaryFunction
-
- com.singularsys.jeptests.system.JepTest.MyNaryBinary
-
- All Implemented Interfaces:
PostfixMathCommandI
,java.io.Serializable
- Enclosing class:
- JepTest
public class JepTest.MyNaryBinary extends NaryBinaryFunction
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand
curNumberOfParameters, name, NaN, numberOfParameters
-
-
Constructor Summary
Constructors Constructor Description MyNaryBinary()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkNumberOfParameters(int n)
Checks the number of parameters of the function.java.lang.Object
eval(java.lang.Object l, java.lang.Object r)
-
Methods inherited from class com.singularsys.jep.functions.NaryBinaryFunction
eval, instanceOf, instanceOf, run
-
Methods inherited from class com.singularsys.jep.functions.PostfixMathCommand
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString, toString
-
-
-
-
Method Detail
-
checkNumberOfParameters
public boolean checkNumberOfParameters(int n)
Description copied from class:PostfixMathCommand
Checks the number of parameters of the function. Functions which set numberOfParameter=-1 should overload this method- Specified by:
checkNumberOfParameters
in interfacePostfixMathCommandI
- Overrides:
checkNumberOfParameters
in classNaryBinaryFunction
- Parameters:
n
- number of parameters function will be called with.- Returns:
- false if an illegal number of parameters is supplied, true otherwise.
-
eval
public java.lang.Object eval(java.lang.Object l, java.lang.Object r) throws EvaluationException
- Specified by:
eval
in classNaryBinaryFunction
- Throws:
EvaluationException
-
-