-
public final class MaybeUseCaseConfig.Builder<T extends Object>Constructs references to lambdas and some basic configuration used to process results of Mayber use case.
-
-
Constructor Summary
Constructors Constructor Description MaybeUseCaseConfig.Builder()
-
Method Summary
Modifier and Type Method Description final UnitonStart(Function0<Unit> onStart)Set lambda which is called right before internal Maybe is subscribed final UnitonSuccess(Function1<T, Unit> onSuccess)Set lambda which is called when onSuccess on internal Maybe is called final UnitonComplete(Function0<Unit> onComplete)Set lambda which is called when onComplete on internal Maybe is called final UnitonError(Function1<Throwable, Unit> onError)Set lambda which is called when onError on internal Maybe is called final UnitdisposePrevious(Boolean disposePrevious)Set whether currently running internal Maybe should be disposed when execute is called repeatedly. final MaybeUseCaseConfig<T>build()-
-
Method Detail
-
onStart
final Unit onStart(Function0<Unit> onStart)
Set lambda which is called right before internal Maybe is subscribed
- Parameters:
onStart- Lambda called right before Maybe is subscribed.
-
onSuccess
final Unit onSuccess(Function1<T, Unit> onSuccess)
Set lambda which is called when onSuccess on internal Maybe is called
- Parameters:
onSuccess- Lambda called when onSuccess is emitted.
-
onComplete
final Unit onComplete(Function0<Unit> onComplete)
Set lambda which is called when onComplete on internal Maybe is called
- Parameters:
onComplete- Lambda called when onComplete is emitted.
-
onError
final Unit onError(Function1<Throwable, Unit> onError)
Set lambda which is called when onError on internal Maybe is called
- Parameters:
onError- Lambda called when onError is emitted.
-
disposePrevious
final Unit disposePrevious(Boolean disposePrevious)
Set whether currently running internal Maybe should be disposed when execute is called repeatedly.
- Parameters:
disposePrevious- True if currently running internal Maybe should be disposed
-
build
final MaybeUseCaseConfig<T> build()
-
-
-
-