Class Singles

    • Method Detail

      • flatMapCompletable

        public static <T> SingleConverter<T,​Completable> flatMapCompletable​(Function<? super T,​? extends CompletableSource> onSuccessHandler,
                                                                                  Function<? super java.lang.Throwable,​? extends CompletableSource> onErrorHandler)
        Maps the terminal signals of the upstream into CompletableSources and subscribes to it, relaying its terminal events to the downstream.
        Type Parameters:
        T - the upstream success value type
        Parameters:
        onSuccessHandler - 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.
        Returns:
        the new SingleConverter instance
        Since:
        0.20.2
      • flatMapMaybe

        public static <T,​R> SingleConverter<T,​Maybe<R>> flatMapMaybe​(Function<? super T,​? extends MaybeSource<? extends R>> onSuccessHandler,
                                                                                 Function<? super java.lang.Throwable,​? extends MaybeSource<? extends R>> onErrorHandler)
        Maps the terminal signals of the upstream into MaybeSources and subscribes to it, relaying its terminal events to the downstream.
        Type Parameters:
        T - the upstream success value type
        R - the element type of the mapped-in MaybeSource
        Parameters:
        onSuccessHandler - 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.
        Returns:
        the new SingleConverter instance
        Since:
        0.20.2
      • flatMapObservable

        public static <T,​R> SingleConverter<T,​Observable<R>> flatMapObservable​(Function<? super T,​? extends ObservableSource<? extends R>> onSuccessHandler,
                                                                                           Function<? super java.lang.Throwable,​? extends ObservableSource<? extends R>> onErrorHandler)
        Maps the terminal signals of the upstream into ObservableSources and subscribes to it, relaying its terminal events to the downstream.
        Type Parameters:
        T - the upstream success value type
        R - the element type of the mapped-in ObservableSource
        Parameters:
        onSuccessHandler - 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.
        Returns:
        the new SingleConverter instance
        Since:
        0.20.2
      • flatMapFlowable

        public static <T,​R> SingleConverter<T,​Flowable<R>> flatMapFlowable​(Function<? super T,​? extends Publisher<? extends R>> onSuccessHandler,
                                                                                       Function<? super java.lang.Throwable,​? extends Publisher<? extends R>> onErrorHandler)
        Maps the terminal signals of the upstream into Publishers and subscribes to it, relaying its terminal events to the downstream.
        Type Parameters:
        T - the upstream success value type
        R - the element type of the mapped-in Publisher
        Parameters:
        onSuccessHandler - 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.
        Returns:
        the new SingleConverter instance
        Since:
        0.20.2