Skip to content

Commit aa31330

Browse files
authored
2.x: Final planned Observable marble additions/fixes (#5805)
1 parent 31ab140 commit aa31330

File tree

1 file changed

+33
-7
lines changed

1 file changed

+33
-7
lines changed

src/main/java/io/reactivex/Observable.java

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12657,7 +12657,7 @@ public final Single<List<T>> toList(final int capacityHint) {
1265712657
* Returns a Single that emits a single item, a list composed of all the items emitted by the
1265812658
* finite source ObservableSource.
1265912659
* <p>
12660-
* <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toList.2.png" alt="">
12660+
* <img width="640" height="365" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toList.o.c.png" alt="">
1266112661
* <p>
1266212662
* Normally, an ObservableSource that returns multiple items will do so by invoking its {@link Observer}'s
1266312663
* {@link Observer#onNext onNext} method for each such item. You can change this behavior, instructing the
@@ -12910,6 +12910,30 @@ public final <K, V> Single<Map<K, Collection<V>>> toMultimap(
1291012910

1291112911
/**
1291212912
* Converts the current Observable into a Flowable by applying the specified backpressure strategy.
12913+
* <p>
12914+
* Marble diagrams for the various backpressure strategies are as follows:
12915+
* <ul>
12916+
* <li>{@link BackpressureStrategy#BUFFER}
12917+
* <p>
12918+
* <img width="640" height="274" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toFlowable.o.buffer.png" alt="">
12919+
* </li>
12920+
* <li>{@link BackpressureStrategy#DROP}
12921+
* <p>
12922+
* <img width="640" height="389" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toFlowable.o.drop.png" alt="">
12923+
* </li>
12924+
* <li>{@link BackpressureStrategy#LATEST}
12925+
* <p>
12926+
* <img width="640" height="296" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toFlowable.o.latest.png" alt="">
12927+
* </li>
12928+
* <li>{@link BackpressureStrategy#ERROR}
12929+
* <p>
12930+
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toFlowable.o.error.png" alt="">
12931+
* </li>
12932+
* <li>{@link BackpressureStrategy#MISSING}
12933+
* <p>
12934+
* <img width="640" height="411" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toFlowable.o.missing.png" alt="">
12935+
* </li>
12936+
* </ul>
1291312937
* <dl>
1291412938
* <dt><b>Backpressure:</b></dt>
1291512939
* <dd>The operator applies the chosen backpressure strategy of {@link BackpressureStrategy} enum.</dd>
@@ -13046,6 +13070,8 @@ public final Single<List<T>> toSortedList(int capacityHint) {
1304613070
/**
1304713071
* Modifies the source ObservableSource so that subscribers will dispose it on a specified
1304813072
* {@link Scheduler}.
13073+
* <p>
13074+
* <img width="640" height="452" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/unsubscribeOn.o.png" alt="">
1304913075
* <dl>
1305013076
* <dt><b>Scheduler:</b></dt>
1305113077
* <dd>You specify which {@link Scheduler} this operator will use.</dd>
@@ -13908,6 +13934,8 @@ public final <U, R> Observable<R> zipWith(Iterable<U> other, BiFunction<? super
1390813934
* Returns an Observable that emits items that are the result of applying a specified function to pairs of
1390913935
* values, one each from the source ObservableSource and another specified ObservableSource.
1391013936
* <p>
13937+
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/zip.png" alt="">
13938+
* <p>
1391113939
* The operator subscribes to its sources in order they are specified and completes eagerly if
1391213940
* one of the sources is shorter than the rest while disposing the other sources. Therefore, it
1391313941
* is possible those other sources will never be able to run to completion (and thus not calling
@@ -13919,8 +13947,6 @@ public final <U, R> Observable<R> zipWith(Iterable<U> other, BiFunction<? super
1391913947
* <br>To work around this termination property,
1392013948
* use {@link #doOnDispose(Action)} as well or use {@code using()} to do cleanup in case of completion
1392113949
* or a dispose() call.
13922-
*
13923-
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/zip.png" alt="">
1392413950
* <dl>
1392513951
* <dt><b>Scheduler:</b></dt>
1392613952
* <dd>{@code zipWith} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -13951,6 +13977,8 @@ public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
1395113977
* Returns an Observable that emits items that are the result of applying a specified function to pairs of
1395213978
* values, one each from the source ObservableSource and another specified ObservableSource.
1395313979
* <p>
13980+
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/zip.png" alt="">
13981+
* <p>
1395413982
* The operator subscribes to its sources in order they are specified and completes eagerly if
1395513983
* one of the sources is shorter than the rest while disposing the other sources. Therefore, it
1395613984
* is possible those other sources will never be able to run to completion (and thus not calling
@@ -13962,8 +13990,6 @@ public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
1396213990
* <br>To work around this termination property,
1396313991
* use {@link #doOnDispose(Action)} as well or use {@code using()} to do cleanup in case of completion
1396413992
* or a dispose() call.
13965-
*
13966-
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/zip.png" alt="">
1396713993
* <dl>
1396813994
* <dt><b>Scheduler:</b></dt>
1396913995
* <dd>{@code zipWith} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -13996,6 +14022,8 @@ public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
1399614022
* Returns an Observable that emits items that are the result of applying a specified function to pairs of
1399714023
* values, one each from the source ObservableSource and another specified ObservableSource.
1399814024
* <p>
14025+
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/zip.png" alt="">
14026+
* <p>
1399914027
* The operator subscribes to its sources in order they are specified and completes eagerly if
1400014028
* one of the sources is shorter than the rest while disposing the other sources. Therefore, it
1400114029
* is possible those other sources will never be able to run to completion (and thus not calling
@@ -14007,8 +14035,6 @@ public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
1400714035
* <br>To work around this termination property,
1400814036
* use {@link #doOnDispose(Action)} as well or use {@code using()} to do cleanup in case of completion
1400914037
* or a dispose() call.
14010-
*
14011-
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/zip.png" alt="">
1401214038
* <dl>
1401314039
* <dt><b>Scheduler:</b></dt>
1401414040
* <dd>{@code zipWith} does not operate by default on a particular {@link Scheduler}.</dd>

0 commit comments

Comments
 (0)