public final class Singles
extends java.lang.Object
SingleConverters,
use Single.as(SingleConverter)
to apply the operators to an existing sequence.SingleTransformers| Modifier and Type | Method and Description |
|---|---|
static <T> io.reactivex.SingleConverter<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)
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.SingleConverter<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)
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.SingleConverter<T,io.reactivex.Maybe<R>> |
flatMapMaybe(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)
Maps the terminal signals of the upstream into
MaybeSources and
subscribes to it, relaying its terminal events to the downstream. |
static <T,R> io.reactivex.SingleConverter<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)
Maps the terminal signals of the upstream into
ObservableSources and
subscribes to it, relaying its terminal events to the downstream. |
public static <T> io.reactivex.SingleConverter<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)
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.public static <T,R> io.reactivex.SingleConverter<T,io.reactivex.Maybe<R>> flatMapMaybe(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)
MaybeSources and
subscribes to it, relaying its terminal events to the downstream.T - the upstream success value typeR - the element type of the mapped-in MaybeSourceonSuccessHandler - a function called with the upstream success value and should
return a MaybeSource to continue with.onErrorHandler - called when the upstream fails and should return the
MaybeSource for the given Throwable instance to continue with.public static <T,R> io.reactivex.SingleConverter<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)
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.public static <T,R> io.reactivex.SingleConverter<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)
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.