Flow.flattenOptional

Collect the value of Optional from all the elements passing through this flow , empty Optional is filtered out.

Simple operators

Signature

Flow.flattenOptionalFlow.flattenOptional

Description

Creates a Flow that emits the value of each present Optional element passing through it, while empty Optional elements are filtered out (dropped).

Reactive Streams semantics

Emits when the current Optional’s value is present.

Backpressures when the value of the current Optional is present and downstream backpressures.

Completes when upstream completes.

Cancels when downstream cancels.