Class IsType
- java.lang.Object
-
- com.singularsys.jep.functions.PostfixMathCommand
-
- com.singularsys.jep.functions.UnaryFunction
-
- com.singularsys.jep.misc.functions.IsType
-
- All Implemented Interfaces:
PostfixMathCommandI
,java.io.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 examplejep.addFunction("isNumber",new IsType(Number.class));
- Author:
- Richard Morris
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand
curNumberOfParameters, name, NaN, numberOfParameters
-
-
Constructor Summary
Constructors Constructor Description IsType(java.lang.Class<?> classType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
eval(java.lang.Object arg)
-
Methods inherited from class com.singularsys.jep.functions.UnaryFunction
instanceOf, instanceOf, run
-
Methods inherited from class com.singularsys.jep.functions.PostfixMathCommand
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, checkNumberOfParameters, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString, toString
-
-
-
-
Method Detail
-
eval
public java.lang.Object eval(java.lang.Object arg) throws EvaluationException
- Specified by:
eval
in classUnaryFunction
- Throws:
EvaluationException
-
-