Class ChainableUnaryFunction
java.lang.Object
com.singularsys.jep.functions.PostfixMathCommand
com.singularsys.jep.misc.overloadedfunctions.AlternateFunctions
com.singularsys.extensions.chained.ChainableUnaryFunction
- All Implemented Interfaces:
ChainedFunctionI,DirtyFunction,CallbackEvaluationI,JepComponent,PostfixMathCommandI,Serializable
public class ChainableUnaryFunction
extends AlternateFunctions
implements ChainedFunctionI, DirtyFunction
Converts a
UnaryFunction so it can be used in a chain or directly as unary function.
If the number of arguments is 0, then the a ChainedUnaryFunction is used,
otherwise the function is used normally.- See Also:
-
Field Summary
Fields inherited from class com.singularsys.jep.misc.overloadedfunctions.AlternateFunctions
functions, nf, otFields inherited from class com.singularsys.jep.functions.PostfixMathCommand
curNumberOfParameters, description, name, NaN, numberOfParameters -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionEvaluate a chained function using an additional argument.Get the chained version of the function.Return a description of the function from the properties file.Gets a light-weight instance suitable for using in multiple threads.Get the original unary function that is wrapped by this chainable function.Methods inherited from class com.singularsys.jep.misc.overloadedfunctions.AlternateFunctions
checkNumberOfParameters, evaluate, getFunctionForNArgs, initMethods inherited from class com.singularsys.jep.functions.PostfixMathCommand
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, asType, getDescription, getDescriptionWithType, getName, getNumberOfParameters, run, setCurNumberOfParameters, setDescription, setName, toString, toString
-
Constructor Details
-
ChainableUnaryFunction
-
-
Method Details
-
apply
Description copied from interface:ChainedFunctionIEvaluate a chained function using an additional argument.- Specified by:
applyin interfaceChainedFunctionI- Parameters:
ev- the evaluatornode- top node of functionarg- additional argument from previous element in the chain- Returns:
- Throws:
EvaluationException
-
getLightWeightInstance
Description copied from interface:JepComponentGets a light-weight instance suitable for using in multiple threads.- Specified by:
getLightWeightInstancein interfaceJepComponent- Overrides:
getLightWeightInstancein classAlternateFunctions- Returns:
- either a new instance, null or 'this'.
-
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 classAlternateFunctions- Returns:
- the description of the function
-
getRootFunction
Get the original unary function that is wrapped by this chainable function.- Returns:
- the original binary function
-
getChainedFunction
Get the chained version of the function.- Returns:
- the chained version of the unary function
-