Class StreamTerminalFunction
java.lang.Object
com.singularsys.jep.functions.PostfixMathCommand
com.singularsys.jep.functions.UnaryFunction
com.singularsys.extensions.stream.StreamTerminalFunction
- All Implemented Interfaces:
JepComponent,PostfixMathCommandI,Serializable
A terminal function that takes a Stream as its single argument, takes all elements from the stream
and passes them as arguments to the inner functions.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.singularsys.jep.functions.UnaryFunction
UnaryFunction.FunctionWithException<T> -
Field Summary
Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand
curNumberOfParameters, description, name, NaN, numberOfParameters -
Constructor Summary
ConstructorsConstructorDescriptionConstructor wrapping any PFMC. -
Method Summary
Modifier and TypeMethodDescriptionEvaluate the functionReturn a description of the function from the properties file.Gets a light-weight instance suitable for using in multiple threads.voidInitialize the component.Methods inherited from class com.singularsys.jep.functions.UnaryFunction
instanceOf, instanceOf, 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
-
StreamTerminalFunction
Constructor wrapping any PFMC.- Parameters:
inner- the PFMC used to process the arguments
-
-
Method Details
-
eval
Description copied from class:UnaryFunctionEvaluate the function- Specified by:
evalin classUnaryFunction- Parameters:
arg- the single argument passed in- Returns:
- the result of the function
- Throws:
EvaluationException- on error
-
init
Description copied from interface:JepComponentInitialize the component. This method is called whenever a component is added to Jep. Hence, it allows components to keep track of the other components they may rely on.- Specified by:
initin interfaceJepComponent- Parameters:
jep- the current Jep instance
-
getLightWeightInstance
Description copied from interface:JepComponentGets a light-weight instance suitable for using in multiple threads.- Specified by:
getLightWeightInstancein interfaceJepComponent- 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 classPostfixMathCommand- Returns:
- the description of the function
-