Class StreamTerminalNaryBinaryFunction

All Implemented Interfaces:
ZeroLengthBehaviourI, ZeroLengthBehaviourI.DefaultZeroLengthBehaviourI, JepComponent, PostfixMathCommandI, Serializable

public class StreamTerminalNaryBinaryFunction extends UnaryFunction implements JepComponent, ZeroLengthBehaviourI.DefaultZeroLengthBehaviourI
Terminal function that reduces a stream to a single value using an NaryBinaryFunction. It can be set up with either an initial value, in which case the reduction is performed using the reduce method of the stream, or without an initial value, in which case the reduction is performed using the reduce method of the stream.

By default, if the stream is empty, an exception is thrown, but the behaviour can be configured using the methods of the ZeroLengthBehaviourI interface.

See Also: