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`, `Serializable`

Enclosing class:
  `JepTest`

protected static class JepTest.MyNaryBinary extends NaryBinaryFunction
An NaryBinary function

See Also:
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand

  `curNumberOfParameters, description, name, NaN, numberOfParameters`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `MyNaryBinary()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `checkNumberOfParameters(int n)`
  Checks the number of parameters of the function.
  `Object`
  `eval(Object l, Object r)`
  Evaluate given a pair of arguments.

  ### Methods inherited from class com.singularsys.jep.functions.NaryBinaryFunction

  `eval, instanceOf, instanceOf, instanceOf, instanceOf, run`

  ### Methods inherited from class com.singularsys.jep.functions.PostfixMathCommand

  `asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, asType, getDescription, getDescription, getDescriptionWithType, getName, getNumberOfParameters, setCurNumberOfParameters, setDescription, setName, toString, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### MyNaryBinary

    protected MyNaryBinary()

- ## Method Details

  - ### 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 interface `PostfixMathCommandI`
    Overrides:
      `checkNumberOfParameters` in class `NaryBinaryFunction`
    Parameters:
      `n` - number of parameters function will be called with.
    Returns:
      false if an illegal number of parameters is supplied, true otherwise.

  - ### eval

    public Object eval(Object l, Object r) throws EvaluationException
    Description copied from class: `NaryBinaryFunction`
    Evaluate given a pair of arguments. Must be specified for all implementing classes.
    Specified by:
      `eval` in class `NaryBinaryFunction`
    Parameters:
      `l` - lhs argument
      `r` - rhs argument
    Returns:
      result of applying the function to the arguments
    Throws:
      `EvaluationException` - on error.