public final class Singles extends Object
SingleConverter
s,
use Single.to(SingleConverter)
to apply the operators to an existing sequence.SingleTransformers
Modifier and Type | Method and Description |
---|---|
static <T> SingleConverter<T,Completable> |
flatMapCompletable(Function<? super T,? extends CompletableSource> onSuccessHandler,
Function<? super Throwable,? extends CompletableSource> onErrorHandler)
Maps the terminal signals of the upstream into
CompletableSource s and
subscribes to it, relaying its terminal events to the downstream. |
static <T,R> SingleConverter<T,Flowable<R>> |
flatMapFlowable(Function<? super T,? extends Publisher<? extends R>> onSuccessHandler,
Function<? super Throwable,? extends Publisher<? extends R>> onErrorHandler)
Maps the terminal signals of the upstream into
Publisher s and
subscribes to it, relaying its terminal events to the downstream. |
static <T,R> SingleConverter<T,Maybe<R>> |
flatMapMaybe(Function<? super T,? extends MaybeSource<? extends R>> onSuccessHandler,
Function<? super Throwable,? extends MaybeSource<? extends R>> onErrorHandler)
Maps the terminal signals of the upstream into
MaybeSource s and
subscribes to it, relaying its terminal events to the downstream. |
static <T,R> SingleConverter<T,Observable<R>> |
flatMapObservable(Function<? super T,? extends ObservableSource<? extends R>> onSuccessHandler,
Function<? super Throwable,? extends ObservableSource<? extends R>> onErrorHandler)
Maps the terminal signals of the upstream into
ObservableSource s and
subscribes to it, relaying its terminal events to the downstream. |
public static <T> SingleConverter<T,Completable> flatMapCompletable(Function<? super T,? extends CompletableSource> onSuccessHandler, Function<? super Throwable,? extends CompletableSource> onErrorHandler)
CompletableSource
s 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> SingleConverter<T,Maybe<R>> flatMapMaybe(Function<? super T,? extends MaybeSource<? extends R>> onSuccessHandler, Function<? super Throwable,? extends MaybeSource<? extends R>> onErrorHandler)
MaybeSource
s 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> SingleConverter<T,Observable<R>> flatMapObservable(Function<? super T,? extends ObservableSource<? extends R>> onSuccessHandler, Function<? super Throwable,? extends ObservableSource<? extends R>> onErrorHandler)
ObservableSource
s 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> SingleConverter<T,Flowable<R>> flatMapFlowable(Function<? super T,? extends Publisher<? extends R>> onSuccessHandler, Function<? super Throwable,? extends Publisher<? extends R>> onErrorHandler)
Publisher
s 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.