Class ExStream<T>

java.lang.Object
net.dapete.exceptional.stream.ExStream<T>
Type Parameters:
T - the type of the stream elements
All Implemented Interfaces:
AutoCloseable, BaseStream<T, Stream<T>>, Stream<T>

public final class ExStream<T> extends Object implements Stream<T>
A Stream with additional functionality for functional interfaces that throw Exceptions.

Implements versions of all methods from Stream that use functional interfaces, using their counterparts with Exceptions instead, e.g. exMap(ExFunction) in parallel to map(Function).

If these functional interfaces throw a checked exception, a ExException will be thrown instead. This will have the original exception as its cause.

Note that this exception will likely not be thrown when a method is called, but only when a terminal operation or a stateful intermediate operation is used on the stream (except if it is itself such an operation).