Class SingleTransformers

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T,​R>
      SingleTransformer<T,​R>
      flatMap​(Function<? super T,​? extends SingleSource<? extends R>> onSuccessHandler, Function<? super java.lang.Throwable,​? extends SingleSource<? extends R>> onErrorHandler)
      Maps the terminal signals of the upstream into SingleSources and subscribes to it, relaying its terminal events to the downstream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • flatMap

        public static <T,​R> SingleTransformer<T,​R> flatMap​(Function<? super T,​? extends SingleSource<? extends R>> onSuccessHandler,
                                                                       Function<? super java.lang.Throwable,​? extends SingleSource<? extends R>> onErrorHandler)
        Maps the terminal signals of the upstream into SingleSources and subscribes to it, relaying its terminal events to the downstream.
        Type Parameters:
        T - the success type of the upstream
        R - the success type of the resulting Maybe
        Parameters:
        onSuccessHandler - 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.
        Returns:
        the new SingleTransformer instance
        Since:
        0.20.2