public final class Maybes
extends java.lang.Object
MaybeConverters,
use Maybe.as(MaybeConverter)
to apply the operators to an existing sequence.MaybeTransformers| Modifier and Type | Method and Description |
|---|---|
static <T> io.reactivex.MaybeConverter<T,io.reactivex.Completable> |
flatMapCompletable(io.reactivex.functions.Function<? super T,? extends io.reactivex.CompletableSource> onSuccessHandler,
io.reactivex.functions.Function<? super java.lang.Throwable,? extends io.reactivex.CompletableSource> onErrorHandler,
java.util.concurrent.Callable<? extends io.reactivex.CompletableSource> onCompleteHandler)
Maps the terminal signals of the upstream into
CompletableSources and
subscribes to it, relaying its terminal events to the downstream. |
static <T,R> io.reactivex.MaybeConverter<T,io.reactivex.Flowable<R>> |
flatMapFlowable(io.reactivex.functions.Function<? super T,? extends org.reactivestreams.Publisher<? extends R>> onSuccessHandler,
io.reactivex.functions.Function<? super java.lang.Throwable,? extends org.reactivestreams.Publisher<? extends R>> onErrorHandler,
java.util.concurrent.Callable<? extends org.reactivestreams.Publisher<? extends R>> onCompleteHandler)
Maps the terminal signals of the upstream into
Publishers and
subscribes to it, relaying its terminal events to the downstream. |
static <T,R> io.reactivex.MaybeConverter<T,io.reactivex.Observable<R>> |
flatMapObservable(io.reactivex.functions.Function<? super T,? extends io.reactivex.ObservableSource<? extends R>> onSuccessHandler,
io.reactivex.functions.Function<? super java.lang.Throwable,? extends io.reactivex.ObservableSource<? extends R>> onErrorHandler,
java.util.concurrent.Callable<? extends io.reactivex.ObservableSource<? extends R>> onCompleteHandler)
Maps the terminal signals of the upstream into
ObservableSources and
subscribes to it, relaying its terminal events to the downstream. |
static <T,R> io.reactivex.MaybeConverter<T,io.reactivex.Single<R>> |
flatMapSingle(io.reactivex.functions.Function<? super T,? extends io.reactivex.SingleSource<? extends R>> onSuccessHandler,
io.reactivex.functions.Function<? super java.lang.Throwable,? extends io.reactivex.SingleSource<? extends R>> onErrorHandler,
java.util.concurrent.Callable<? extends io.reactivex.SingleSource<? extends R>> onCompleteHandler)
Maps the terminal signals of the upstream into
SingleSources and
subscribes to it, relaying its terminal events to the downstream. |
public static <T> io.reactivex.MaybeConverter<T,io.reactivex.Completable> flatMapCompletable(io.reactivex.functions.Function<? super T,? extends io.reactivex.CompletableSource> onSuccessHandler,
io.reactivex.functions.Function<? super java.lang.Throwable,? extends io.reactivex.CompletableSource> onErrorHandler,
java.util.concurrent.Callable<? extends io.reactivex.CompletableSource> onCompleteHandler)
CompletableSources and
subscribes to it, relaying its terminal events to the downstream.T - the upstream success value typeonSuccessHandler - a function called with the upstream success value and should
return a CompletableSource to continue with.onErrorHandler - called when the upstream fails and should return the
CompletableSource for the given Throwable instance to continue with.onCompleteHandler - called when the upstream completes normally and should return
the CompletableSource to continue with.public static <T,R> io.reactivex.MaybeConverter<T,io.reactivex.Single<R>> flatMapSingle(io.reactivex.functions.Function<? super T,? extends io.reactivex.SingleSource<? extends R>> onSuccessHandler,
io.reactivex.functions.Function<? super java.lang.Throwable,? extends io.reactivex.SingleSource<? extends R>> onErrorHandler,
java.util.concurrent.Callable<? extends io.reactivex.SingleSource<? extends R>> onCompleteHandler)
SingleSources and
subscribes to it, relaying its terminal events to the downstream.T - the upstream success value typeR - the element type of the mapped-in SingleSourceonSuccessHandler - 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.onCompleteHandler - called when the upstream completes normally and should return
the SingleSource to continue with.public static <T,R> io.reactivex.MaybeConverter<T,io.reactivex.Observable<R>> flatMapObservable(io.reactivex.functions.Function<? super T,? extends io.reactivex.ObservableSource<? extends R>> onSuccessHandler,
io.reactivex.functions.Function<? super java.lang.Throwable,? extends io.reactivex.ObservableSource<? extends R>> onErrorHandler,
java.util.concurrent.Callable<? extends io.reactivex.ObservableSource<? extends R>> onCompleteHandler)
ObservableSources and
subscribes to it, relaying its terminal events to the downstream.T - the upstream success value typeR - the element type of the mapped-in ObservableSourceonSuccessHandler - a function called with the upstream success value and should
return a ObservableSource to continue with.onErrorHandler - called when the upstream fails and should return the
ObservableSource for the given Throwable instance to continue with.onCompleteHandler - called when the upstream completes normally and should return
the ObservableSource to continue with.public static <T,R> io.reactivex.MaybeConverter<T,io.reactivex.Flowable<R>> flatMapFlowable(io.reactivex.functions.Function<? super T,? extends org.reactivestreams.Publisher<? extends R>> onSuccessHandler,
io.reactivex.functions.Function<? super java.lang.Throwable,? extends org.reactivestreams.Publisher<? extends R>> onErrorHandler,
java.util.concurrent.Callable<? extends org.reactivestreams.Publisher<? extends R>> onCompleteHandler)
Publishers and
subscribes to it, relaying its terminal events to the downstream.T - the upstream success value typeR - the element type of the mapped-in PublisheronSuccessHandler - a function called with the upstream success value and should
return a Publisher to continue with.onErrorHandler - called when the upstream fails and should return the
Publisher for the given Throwable instance to continue with.onCompleteHandler - called when the upstream completes normally and should return
the Publisher to continue with.