Class ConstantFunction
java.lang.Object
com.singularsys.jep.functions.PostfixMathCommand
com.singularsys.jep.functions.NullaryFunction
com.singularsys.jep.misc.functions.ConstantFunction
- All Implemented Interfaces:
PostfixMathCommandI,Serializable
Functions which always return a constant value.
- Author:
- Richard Morris
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.singularsys.jep.functions.NullaryFunction
NullaryFunction.SupplierWithException<T> -
Field Summary
Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand
curNumberOfParameters, description, name, NaN, numberOfParameters -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.singularsys.jep.functions.NullaryFunction
instanceOf, instanceOf, runMethods inherited from class com.singularsys.jep.functions.PostfixMathCommand
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, asType, checkNumberOfParameters, getDescription, getDescriptionWithType, getName, getNumberOfParameters, setCurNumberOfParameters, setDescription, setName, toString, toString
-
Constructor Details
-
ConstantFunction
- Parameters:
value- the value returned by the function
-
-
Method Details
-
eval
Description copied from class:NullaryFunctionEvaluate the function- Specified by:
evalin classNullaryFunction- Returns:
- value of the function
-
getValue
-
getDescription
Description copied from class:PostfixMathCommandReturn a description of the function from the properties file. The property name is the class name followed by ".description". The property is found using theJepMessagesclass, which can be configured to add additional properties files. IfPostfixMathCommand.setDescription(String)has been called, return the description set by that method instead.- Specified by:
getDescriptionin interfacePostfixMathCommandI- Overrides:
getDescriptionin classPostfixMathCommand- Returns:
- the description of the function
-