Class IsType

All Implemented Interfaces:
PostfixMathCommandI, Serializable

public class IsType extends UnaryFunction
Tests if a value is an instance of a specified type. The result is true if the argument is an instance of the specified type, false otherwise. For example
jep.addFunction("isNumber",new IsType(Number.class));
Author:
Richard Morris
See Also:
  • Constructor Details

    • IsType

      public IsType(Class<?> classType)
      Parameters:
      classType - the class to test with
  • Method Details

    • eval

      public Object eval(Object arg)
      Description copied from class: UnaryFunction
      Evaluate the function
      Specified by:
      eval in class UnaryFunction
      Parameters:
      arg - the single argument passed in
      Returns:
      the result of the function