Class StreamSourcePfmc

All Implemented Interfaces:
PostfixMathCommandI, Serializable

public class StreamSourcePfmc extends NullaryFunction
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: