public final class SingleTransformers extends Object
SingleTransformer
,
use Single.compose(SingleTransformer)
to apply the operators to an existing sequence.Singles
Modifier and Type | Method and Description |
---|---|
static <T,R> SingleTransformer<T,R> |
flatMap(Function<? super T,? extends SingleSource<? extends R>> onSuccessHandler,
Function<? super Throwable,? extends SingleSource<? extends R>> onErrorHandler)
Maps the terminal signals of the upstream into
SingleSource s and
subscribes to it, relaying its terminal events to the downstream. |
public static <T,R> SingleTransformer<T,R> flatMap(Function<? super T,? extends SingleSource<? extends R>> onSuccessHandler, Function<? super Throwable,? extends SingleSource<? extends R>> onErrorHandler)
SingleSource
s and
subscribes to it, relaying its terminal events to the downstream.T
- the success type of the upstreamR
- the success type of the resulting MaybeonSuccessHandler
- a function called with the upstream success value and should
return a SingleSource to continue with.onErrorHandler
- called when the upstream fails and should return the
SingleSource for the given Throwable instance to continue with.