SwitchIfEmptyExtension<T> extension
Extend the Stream class with the ability to return an alternative Stream if the initial Stream completes with no items.
- on
-
- Stream<
T>
- Stream<
Methods
-
switchIfEmpty(
Stream< T> fallbackStream) → Stream<T> -
Available on Stream<
When the original Stream emits no items, this operator subscribes to the given fallback stream and emits items from that Stream instead.T> , provided by the SwitchIfEmptyExtension extension