From 12a46c4b2397ea593e9978447e8bb09db06a71bb Mon Sep 17 00:00:00 2001 From: akarnokd Date: Wed, 10 Jan 2018 16:05:20 +0100 Subject: [PATCH] 2.x: Final planned Observable marble additions/fixes --- src/main/java/io/reactivex/Observable.java | 40 ++++++++++++++++++---- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/src/main/java/io/reactivex/Observable.java b/src/main/java/io/reactivex/Observable.java index dd3c5535ba..6c9a6f986f 100644 --- a/src/main/java/io/reactivex/Observable.java +++ b/src/main/java/io/reactivex/Observable.java @@ -12657,7 +12657,7 @@ public final Single> toList(final int capacityHint) { * Returns a Single that emits a single item, a list composed of all the items emitted by the * finite source ObservableSource. *

- * + * *

* Normally, an ObservableSource that returns multiple items will do so by invoking its {@link Observer}'s * {@link Observer#onNext onNext} method for each such item. You can change this behavior, instructing the @@ -12910,6 +12910,30 @@ public final Single>> toMultimap( /** * Converts the current Observable into a Flowable by applying the specified backpressure strategy. + *

+ * Marble diagrams for the various backpressure strategies are as follows: + *

*
*
Backpressure:
*
The operator applies the chosen backpressure strategy of {@link BackpressureStrategy} enum.
@@ -13046,6 +13070,8 @@ public final Single> toSortedList(int capacityHint) { /** * Modifies the source ObservableSource so that subscribers will dispose it on a specified * {@link Scheduler}. + *

+ * *

*
Scheduler:
*
You specify which {@link Scheduler} this operator will use.
@@ -13908,6 +13934,8 @@ public final Observable zipWith(Iterable other, BiFunction + * + *

* The operator subscribes to its sources in order they are specified and completes eagerly if * one of the sources is shorter than the rest while disposing the other sources. Therefore, it * is possible those other sources will never be able to run to completion (and thus not calling @@ -13919,8 +13947,6 @@ public final Observable zipWith(Iterable other, BiFunctionTo work around this termination property, * use {@link #doOnDispose(Action)} as well or use {@code using()} to do cleanup in case of completion * or a dispose() call. - * - * *

*
Scheduler:
*
{@code zipWith} does not operate by default on a particular {@link Scheduler}.
@@ -13951,6 +13977,8 @@ public final Observable zipWith(ObservableSource other, * Returns an Observable that emits items that are the result of applying a specified function to pairs of * values, one each from the source ObservableSource and another specified ObservableSource. *

+ * + *

* The operator subscribes to its sources in order they are specified and completes eagerly if * one of the sources is shorter than the rest while disposing the other sources. Therefore, it * is possible those other sources will never be able to run to completion (and thus not calling @@ -13962,8 +13990,6 @@ public final Observable zipWith(ObservableSource other, *
To work around this termination property, * use {@link #doOnDispose(Action)} as well or use {@code using()} to do cleanup in case of completion * or a dispose() call. - * - * *

*
Scheduler:
*
{@code zipWith} does not operate by default on a particular {@link Scheduler}.
@@ -13996,6 +14022,8 @@ public final Observable zipWith(ObservableSource other, * Returns an Observable that emits items that are the result of applying a specified function to pairs of * values, one each from the source ObservableSource and another specified ObservableSource. *

+ * + *

* The operator subscribes to its sources in order they are specified and completes eagerly if * one of the sources is shorter than the rest while disposing the other sources. Therefore, it * is possible those other sources will never be able to run to completion (and thus not calling @@ -14007,8 +14035,6 @@ public final Observable zipWith(ObservableSource other, *
To work around this termination property, * use {@link #doOnDispose(Action)} as well or use {@code using()} to do cleanup in case of completion * or a dispose() call. - * - * *

*
Scheduler:
*
{@code zipWith} does not operate by default on a particular {@link Scheduler}.