public final class MaybeTransformers
extends java.lang.Object
MaybeTransformer,
use Maybe.compose(MaybeTransformer)
to apply the operators to an existing sequence.Maybes| Modifier and Type | Method and Description |
|---|---|
static <T,R> io.reactivex.MaybeTransformer<T,R> |
flatMap(io.reactivex.functions.Function<? super T,? extends io.reactivex.MaybeSource<? extends R>> onSuccessHandler,
io.reactivex.functions.Function<? super java.lang.Throwable,? extends io.reactivex.MaybeSource<? extends R>> onErrorHandler,
java.util.concurrent.Callable<? extends io.reactivex.MaybeSource<? extends R>> onCompleteHandler)
Maps the terminal signals of the upstream into
MaybeSources and
subscribes to it, relaying its terminal events to the downstream. |
public static <T,R> io.reactivex.MaybeTransformer<T,R> flatMap(io.reactivex.functions.Function<? super T,? extends io.reactivex.MaybeSource<? extends R>> onSuccessHandler,
io.reactivex.functions.Function<? super java.lang.Throwable,? extends io.reactivex.MaybeSource<? extends R>> onErrorHandler,
java.util.concurrent.Callable<? extends io.reactivex.MaybeSource<? extends R>> onCompleteHandler)
MaybeSources 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 MaybeSource to continue with.onCompleteHandler - called when the upstream completes normally and should return
the MaybeSource to continue with.onErrorHandler - called when the upstream fails and should return the
MaybeSource for the given Throwable instance to continue with.