Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.x: Final planned Observable marble additions/fixes #5805

Merged
merged 1 commit into from
Jan 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 33 additions & 7 deletions src/main/java/io/reactivex/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -12657,7 +12657,7 @@ public final Single<List<T>> 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.
* <p>
* <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toList.2.png" alt="">
* <img width="640" height="365" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toList.o.c.png" alt="">
* <p>
* 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
Expand Down Expand Up @@ -12910,6 +12910,30 @@ public final <K, V> Single<Map<K, Collection<V>>> toMultimap(

/**
* Converts the current Observable into a Flowable by applying the specified backpressure strategy.
* <p>
* Marble diagrams for the various backpressure strategies are as follows:
* <ul>
* <li>{@link BackpressureStrategy#BUFFER}
* <p>
* <img width="640" height="274" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toFlowable.o.buffer.png" alt="">
* </li>
* <li>{@link BackpressureStrategy#DROP}
* <p>
* <img width="640" height="389" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toFlowable.o.drop.png" alt="">
* </li>
* <li>{@link BackpressureStrategy#LATEST}
* <p>
* <img width="640" height="296" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toFlowable.o.latest.png" alt="">
* </li>
* <li>{@link BackpressureStrategy#ERROR}
* <p>
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toFlowable.o.error.png" alt="">
* </li>
* <li>{@link BackpressureStrategy#MISSING}
* <p>
* <img width="640" height="411" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toFlowable.o.missing.png" alt="">
* </li>
* </ul>
* <dl>
* <dt><b>Backpressure:</b></dt>
* <dd>The operator applies the chosen backpressure strategy of {@link BackpressureStrategy} enum.</dd>
Expand Down Expand Up @@ -13046,6 +13070,8 @@ public final Single<List<T>> toSortedList(int capacityHint) {
/**
* Modifies the source ObservableSource so that subscribers will dispose it on a specified
* {@link Scheduler}.
* <p>
* <img width="640" height="452" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/unsubscribeOn.o.png" alt="">
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>You specify which {@link Scheduler} this operator will use.</dd>
Expand Down Expand Up @@ -13908,6 +13934,8 @@ public final <U, R> Observable<R> zipWith(Iterable<U> other, BiFunction<? super
* 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.
* <p>
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/zip.png" alt="">
* <p>
* 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
Expand All @@ -13919,8 +13947,6 @@ public final <U, R> Observable<R> zipWith(Iterable<U> other, BiFunction<? super
* <br>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.
*
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/zip.png" alt="">
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code zipWith} does not operate by default on a particular {@link Scheduler}.</dd>
Expand Down Expand Up @@ -13951,6 +13977,8 @@ public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> 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.
* <p>
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/zip.png" alt="">
* <p>
* 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
Expand All @@ -13962,8 +13990,6 @@ public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
* <br>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.
*
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/zip.png" alt="">
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code zipWith} does not operate by default on a particular {@link Scheduler}.</dd>
Expand Down Expand Up @@ -13996,6 +14022,8 @@ public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> 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.
* <p>
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/zip.png" alt="">
* <p>
* 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
Expand All @@ -14007,8 +14035,6 @@ public final <U, R> Observable<R> zipWith(ObservableSource<? extends U> other,
* <br>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.
*
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/zip.png" alt="">
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code zipWith} does not operate by default on a particular {@link Scheduler}.</dd>
Expand Down