FlatMapExtension<T> extension

Extends the Stream class with the ability to convert the source Stream into a new Stream each time the source emits an item.



flatMap<S>(Stream<S> mapper(T value)) Stream<S>
Converts each emitted item into a Stream using the given mapper function. The newly created Stream will be be listened to and begin emitting items downstream. [...]
flatMapIterable<S>(Stream<Iterable<S>> mapper(T value)) Stream<S>
Converts each item into a Stream. The Stream must return an Iterable. Then, each item from the Iterable will be emitted one by one. [...]