Package hu.akarnokd.rxjava3.operators
Class MaybeTransformers
- java.lang.Object
-
- hu.akarnokd.rxjava3.operators.MaybeTransformers
-
public final class MaybeTransformers extends java.lang.ObjectAdditional operators in the form ofMaybeTransformer, useMaybe.compose(MaybeTransformer)to apply the operators to an existing sequence.- Since:
- 0.20.2
- See Also:
Maybes
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T,R>
MaybeTransformer<T,R>flatMap(Function<? super T,? extends MaybeSource<? extends R>> onSuccessHandler, Function<? super java.lang.Throwable,? extends MaybeSource<? extends R>> onErrorHandler, Supplier<? extends MaybeSource<? extends R>> onCompleteHandler)Maps the terminal signals of the upstream intoMaybeSources and subscribes to it, relaying its terminal events to the downstream.
-
-
-
Method Detail
-
flatMap
public static <T,R> MaybeTransformer<T,R> flatMap(Function<? super T,? extends MaybeSource<? extends R>> onSuccessHandler, Function<? super java.lang.Throwable,? extends MaybeSource<? extends R>> onErrorHandler, Supplier<? extends MaybeSource<? extends R>> onCompleteHandler)
Maps the terminal signals of the upstream intoMaybeSources and subscribes to it, relaying its terminal events to the downstream.- Type Parameters:
T- the success type of the upstreamR- the success type of the resulting Maybe- Parameters:
onSuccessHandler- a function called with the upstream success value and should return a MaybeSource to continue with.onCompleteHandler- called when the upstream completes normally and should return the 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 MaybeTransformer instance
- Since:
- 0.20.2
-
-