As suggested by @johnmcclean-aol (#177 (comment)), an onEmptySwitch(Supplier<? extends Stream<? extends T>>) method might be useful in some situations.
Criticism:
- The current
onEmptyXXX() names were inspired by Optional.orElseXXX(). We should think about the term switch, or if there is any more suitable term for this action
- Due to generic type erasure, we cannot overload a single
onEmptySwitch(Supplier<E>) method with different bounds for <E>. What would be the best upper bound? Seq? Stream? Iterable?