Class StreamSourcePfmc
java.lang.Object
com.singularsys.jep.functions.PostfixMathCommand
com.singularsys.jep.functions.NullaryFunction
com.singularsys.extensions.stream.StreamSourcePfmc
- All Implemented Interfaces:
PostfixMathCommandI,Serializable
A PostfixMathCommandI which returns a stream specified in the constructor.
For example
StreamSourcePfmc source = new StreamSourcePfmc(() -> Stream.of(2,3,5,7,11)));
jep.addFunction("primes", source);
Node node = jep.parse("primes() . toList()");
On each evaluation the Supplier will generate a new Stream.- 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, getDescription, getDescriptionWithType, getName, getNumberOfParameters, setCurNumberOfParameters, setDescription, setName, toString, toString
-
Constructor Details
-
StreamSourcePfmc
-
-
Method Details
-
eval
Description copied from class:NullaryFunctionEvaluate the function- Specified by:
evalin classNullaryFunction- Returns:
- value of the function
- Throws:
EvaluationException- if some error at evaluation time
-