Skip to content

Commit 1236bf3

Browse files
authored
2.x: more cleanup and fixed checker, Maybe.takeUntil (#4533)
1 parent 460c79a commit 1236bf3

File tree

11 files changed

+705
-208
lines changed

11 files changed

+705
-208
lines changed

src/main/java/io/reactivex/Completable.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -759,16 +759,16 @@ public final <T> Observable<T> andThen(ObservableSource<T> next) {
759759
* Returns a Flowable which will subscribe to this Completable and once that is completed then
760760
* will subscribe to the {@code next} Flowable. An error event from this Completable will be
761761
* propagated to the downstream subscriber and will result in skipping the subscription of the
762-
* Observable.
762+
* Publisher.
763763
* <dl>
764764
* <dt><b>Backpressure:</b><dt>
765765
* <dd>The returned {@code Flowable} honors the backpressure of the downstream consumer
766-
* and expects the other {@code Publisher} to honor it as well.
766+
* and expects the other {@code Publisher} to honor it as well.</dd>
767767
* <dt><b>Scheduler:</b></dt>
768768
* <dd>{@code andThen} does not operate by default on a particular {@link Scheduler}.</dd>
769769
* </dl>
770770
* @param <T> the value type of the next Publisher
771-
* @param next the Observable to subscribe after this Completable is completed, not null
771+
* @param next the Publisher to subscribe after this Completable is completed, not null
772772
* @return Flowable that composes this Completable and next
773773
* @throws NullPointerException if next is null
774774
*/
@@ -1135,7 +1135,7 @@ public final Completable doAfterTerminate(final Action onAfterTerminate) {
11351135
}
11361136

11371137
/**
1138-
* <strong>Advanced use without safeguards:</strong> lifts a CompletableSubscriber
1138+
* <strong>Advanced use without safeguards:</strong> lifts a CompletableOperator
11391139
* transformation into the chain of Completables.
11401140
* <dl>
11411141
* <dt><b>Scheduler:</b></dt>
@@ -1360,13 +1360,13 @@ public final Completable retry(Predicate<? super Throwable> predicate) {
13601360

13611361
/**
13621362
* Returns a Completable which given a Publisher and when this Completable emits an error, delivers
1363-
* that error through an Observable and the Publisher should return a value indicating a retry in response
1363+
* that error through a Flowable and the Publisher should return a value indicating a retry in response
13641364
* or a terminal event indicating a termination.
13651365
* <dl>
13661366
* <dt><b>Scheduler:</b></dt>
13671367
* <dd>{@code retryWhen} does not operate by default on a particular {@link Scheduler}.</dd>
13681368
* </dl>
1369-
* @param handler the handler that receives an Observable delivering Throwables and should return a Publisher that
1369+
* @param handler the handler that receives a Flowable delivering Throwables and should return a Publisher that
13701370
* emits items to indicate retries or emits terminal events to indicate termination.
13711371
* @return the new Completable instance
13721372
* @throws NullPointerException if handler is null
@@ -1411,18 +1411,18 @@ public final <T> Observable<T> startWith(Observable<T> other) {
14111411
return other.concatWith(this.<T>toObservable());
14121412
}
14131413
/**
1414-
* Returns an Observable which first delivers the events
1415-
* of the other Observable then runs this Completable.
1414+
* Returns a Flowable which first delivers the events
1415+
* of the other Publisher then runs this Completable.
14161416
* <dl>
14171417
* <dt><b>Backpressure:</b><dt>
14181418
* <dd>The returned {@code Flowable} honors the backpressure of the downstream consumer
1419-
* and expects the other {@code Publisher} to honor it as well.
1419+
* and expects the other {@code Publisher} to honor it as well.</dd>
14201420
* <dt><b>Scheduler:</b></dt>
14211421
* <dd>{@code startWith} does not operate by default on a particular {@link Scheduler}.</dd>
14221422
* </dl>
14231423
* @param <T> the value type
1424-
* @param other the other Observable to run first
1425-
* @return the new Observable instance
1424+
* @param other the other Publisher to run first
1425+
* @return the new Flowable instance
14261426
* @throws NullPointerException if other is null
14271427
*/
14281428
@BackpressureSupport(BackpressureKind.FULL)
@@ -1647,7 +1647,7 @@ public final Completable timeout(long timeout, TimeUnit unit, Scheduler schedule
16471647
* the specified scheduler.
16481648
* <dl>
16491649
* <dt><b>Scheduler:</b></dt>
1650-
* <dd>you specify the {@link Scheduler} this operator runs on.</dd>
1650+
* <dd>You specify the {@link Scheduler} this operator runs on.</dd>
16511651
* </dl>
16521652
* @param timeout the timeout value
16531653
* @param unit the timeout unit
@@ -1686,16 +1686,16 @@ public final <U> U to(Function<? super Completable, U> converter) {
16861686
}
16871687

16881688
/**
1689-
* Returns an Observable which when subscribed to subscribes to this Completable and
1689+
* Returns a Flowable which when subscribed to subscribes to this Completable and
16901690
* relays the terminal events to the subscriber.
16911691
* <dl>
16921692
* <dt><b>Backpressure:</b><dt>
1693-
* <dd>The returned {@code Flowable} honors the backpressure of the downstream consumer.
1693+
* <dd>The returned {@code Flowable} honors the backpressure of the downstream consumer.</dd>
16941694
* <dt><b>Scheduler:</b></dt>
16951695
* <dd>{@code toFlowable} does not operate by default on a particular {@link Scheduler}.</dd>
16961696
* </dl>
16971697
* @param <T> the value type
1698-
* @return the new Observable created
1698+
* @return the new Flowable instance
16991699
*/
17001700
@SuppressWarnings("unchecked")
17011701
@BackpressureSupport(BackpressureKind.FULL)
@@ -1708,16 +1708,16 @@ public final <T> Flowable<T> toFlowable() {
17081708
}
17091709

17101710
/**
1711-
* Converts this Single into a {@link Maybe}.
1711+
* Converts this Completable into a {@link Maybe}.
17121712
* <p>
1713-
* <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Single.toObservable.png" alt="">
1713+
* <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.toObservable.png" alt="">
17141714
* <dl>
17151715
* <dt><b>Scheduler:</b></dt>
17161716
* <dd>{@code toMaybe} does not operate by default on a particular {@link Scheduler}.</dd>
17171717
* </dl>
17181718
*
17191719
* @param <T> the value type
1720-
* @return an {@link Maybe} that emits a single item T or an error.
1720+
* @return a {@link Maybe} that emits a single item T or an error.
17211721
*/
17221722
@SuppressWarnings("unchecked")
17231723
@SchedulerSupport(SchedulerSupport.NONE)

0 commit comments

Comments
 (0)