Skip to content

Commit 709ccd6

Browse files
authored
2.x: Update Maybe doOn{Success,Error,Complete} JavaDoc (#5785)
1 parent a694145 commit 709ccd6

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/main/java/io/reactivex/Maybe.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
* in a sequential fashion following this protocol:<br>
4242
* {@code onSubscribe (onSuccess | onError | onComplete)?}.
4343
* <p>
44+
* Note that {@code onSuccess}, {@code onError} and {@code onComplete} are mutually exclusive events; unlike {@code Observable},
45+
* {@code onSuccess} is never followed by {@code onError} or {@code onComplete}.
4446
* @param <T> the value type
4547
* @since 2.0
4648
*/
@@ -2489,7 +2491,7 @@ public final Maybe<T> doOnDispose(Action onDispose) {
24892491
/**
24902492
* Modifies the source Maybe so that it invokes an action when it calls {@code onComplete}.
24912493
* <p>
2492-
* <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/doOnComplete.png" alt="">
2494+
* <img width="640" height="358" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/doOnComplete.m.png" alt="">
24932495
* <dl>
24942496
* <dt><b>Scheduler:</b></dt>
24952497
* <dd>{@code doOnComplete} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -2516,6 +2518,8 @@ public final Maybe<T> doOnComplete(Action onComplete) {
25162518
/**
25172519
* Calls the shared consumer with the error sent via onError for each
25182520
* MaybeObserver that subscribes to the current Maybe.
2521+
* <p>
2522+
* <img width="640" height="358" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/doOnError.m.png" alt="">
25192523
* <dl>
25202524
* <dt><b>Scheduler:</b></dt>
25212525
* <dd>{@code doOnError} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -2583,6 +2587,8 @@ public final Maybe<T> doOnSubscribe(Consumer<? super Disposable> onSubscribe) {
25832587
/**
25842588
* Calls the shared consumer with the success value sent via onSuccess for each
25852589
* MaybeObserver that subscribes to the current Maybe.
2590+
* <p>
2591+
* <img width="640" height="358" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/doOnSuccess.m.png" alt="">
25862592
* <dl>
25872593
* <dt><b>Scheduler:</b></dt>
25882594
* <dd>{@code doOnSuccess} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -2653,7 +2659,7 @@ public final <R> Maybe<R> flatMap(Function<? super T, ? extends MaybeSource<? ex
26532659

26542660
/**
26552661
* Maps the onSuccess, onError or onComplete signals of this Maybe into MaybeSource and emits that
2656-
* MaybeSource's signals
2662+
* MaybeSource's signals.
26572663
* <p>
26582664
* <img width="640" height="410" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/mergeMap.nce.png" alt="">
26592665
* <dl>
@@ -4140,7 +4146,7 @@ public final <U> Maybe<T> timeout(Publisher<U> timeoutIndicator, MaybeSource<? e
41404146

41414147
/**
41424148
* Returns a Maybe which makes sure when a MaybeObserver disposes the Disposable,
4143-
* that call is propagated up on the specified scheduler
4149+
* that call is propagated up on the specified scheduler.
41444150
* <dl>
41454151
* <dt><b>Scheduler:</b></dt>
41464152
* <dd>{@code unsubscribeOn} calls dispose() of the upstream on the {@link Scheduler} you specify.</dd>

0 commit comments

Comments
 (0)