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: update javadoc of flatMap() overloads #5127

Merged
merged 1 commit into from
Feb 22, 2017
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
103 changes: 61 additions & 42 deletions src/main/java/io/reactivex/Flowable.java
Original file line number Diff line number Diff line change
Expand Up @@ -8216,9 +8216,10 @@ public final Single<T> firstOrError() {
* <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/flatMap.png" alt="">
* <dl>
* <dt><b>Backpressure:</b></dt>
* <dd>The operator honors backpressure from downstream. The outer {@code Publisher} is consumed
* in unbounded mode (i.e., no backpressure is applied to it). The inner {@code Publisher}s are expected to honor
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
* in a bounded manner (up to {@link #bufferSize()} outstanding request amount for items).
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
Expand Down Expand Up @@ -8247,9 +8248,10 @@ public final <R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<? e
* <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/flatMap.png" alt="">
* <dl>
* <dt><b>Backpressure:</b></dt>
* <dd>The operator honors backpressure from downstream. The outer {@code Publisher} is consumed
* in unbounded mode (i.e., no backpressure is applied to it). The inner {@code Publisher}s are expected to honor
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
* in a bounded manner (up to {@link #bufferSize()} outstanding request amount for items).
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
Expand Down Expand Up @@ -8282,8 +8284,10 @@ public final <R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<? e
* <!-- <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/flatMap.png" alt=""> -->
* <dl>
* <dt><b>Backpressure:</b></dt>
* <dd>The operator honors backpressure from downstream. Both the outer and inner {@code Publisher}s are expected to honor
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
* in a bounded manner (up to {@code maxConcurrency} outstanding request amount for items).
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
Expand Down Expand Up @@ -8316,8 +8320,10 @@ public final <R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<? e
* <!-- <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/flatMap.png" alt=""> -->
* <dl>
* <dt><b>Backpressure:</b></dt>
* <dd>The operator honors backpressure from downstream. Both the outer and inner {@code Publisher}s are expected to honor
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
* in a bounded manner (up to {@code maxConcurrency} outstanding request amount for items).
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
Expand Down Expand Up @@ -8353,8 +8359,10 @@ public final <R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<? e
* <!-- <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/flatMap.png" alt=""> -->
* <dl>
* <dt><b>Backpressure:</b></dt>
* <dd>The operator honors backpressure from downstream. Both the outer and inner {@code Publisher}s are expected to honor
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
* in a bounded manner (up to {@code maxConcurrency} outstanding request amount for items).
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
Expand Down Expand Up @@ -8402,9 +8410,10 @@ public final <R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<? e
* <img width="640" height="410" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/mergeMap.nce.png" alt="">
* <dl>
* <dt><b>Backpressure:</b></dt>
* <dd>The operator honors backpressure from downstream. The outer {@code Publisher} is consumed
* in unbounded mode (i.e., no backpressure is applied to it). The inner {@code Publisher}s are expected to honor
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
* in a bounded manner (up to {@link #bufferSize()} outstanding request amount for items).
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
Expand Down Expand Up @@ -8444,8 +8453,10 @@ public final <R> Flowable<R> flatMap(
* <!-- <img width="640" height="410" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/mergeMap.nce.png" alt=""> -->
* <dl>
* <dt><b>Backpressure:</b></dt>
* <dd>The operator honors backpressure from downstream. Both the outer and inner {@code Publisher}s are expected to honor
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
* in a bounded manner (up to {@code maxConcurrency} outstanding request amount for items).
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
Expand Down Expand Up @@ -8489,20 +8500,21 @@ public final <R> Flowable<R> flatMap(
* <img width="640" height="390" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/mergeMap.r.png" alt="">
* <dl>
* <dt><b>Backpressure:</b></dt>
* <dd>The operator honors backpressure from downstream. The outer {@code Publisher} is consumed
* in unbounded mode (i.e., no backpressure is applied to it). The inner {@code Publisher}s are expected to honor
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
* in a bounded manner (up to {@code maxConcurrency} outstanding request amount for items).
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
*
* @param <U>
* the type of items emitted by the collection Publisher
* the type of items emitted by the inner Publishers
* @param <R>
* the type of items emitted by the resulting Publisher
* the type of items emitted by the combiner function
* @param mapper
* a function that returns a Publisher for each item emitted by the source Publisher
* @param resultSelector
* @param combiner
* a function that combines one item emitted by each of the source and collection Publishers and
* returns an item to be emitted by the resulting Publisher
* @return a Flowable that emits the results of applying a function to a pair of values emitted by the
Expand All @@ -8513,8 +8525,8 @@ public final <R> Flowable<R> flatMap(
@BackpressureSupport(BackpressureKind.FULL)
@SchedulerSupport(SchedulerSupport.NONE)
public final <U, R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<? extends U>> mapper,
BiFunction<? super T, ? super U, ? extends R> resultSelector) {
return flatMap(mapper, resultSelector, false, bufferSize(), bufferSize());
BiFunction<? super T, ? super U, ? extends R> combiner) {
return flatMap(mapper, combiner, false, bufferSize(), bufferSize());
}

/**
Expand All @@ -8524,17 +8536,18 @@ public final <U, R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<
* <img width="640" height="390" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/mergeMap.r.png" alt="">
* <dl>
* <dt><b>Backpressure:</b></dt>
* <dd>The operator honors backpressure from downstream. The outer {@code Publisher} is consumed
* in unbounded mode (i.e., no backpressure is applied to it). The inner {@code Publisher}s are expected to honor
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
* in a bounded manner (up to {@link #bufferSize()} outstanding request amount for items).
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
*
* @param <U>
* the type of items emitted by the collection Publisher
* the type of items emitted by the inner Publishers
* @param <R>
* the type of items emitted by the resulting Publisher
* the type of items emitted by the combiner functions
* @param mapper
* a function that returns a Publisher for each item emitted by the source Publisher
* @param combiner
Expand Down Expand Up @@ -8563,16 +8576,18 @@ public final <U, R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<
* <!-- <img width="640" height="390" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/mergeMap.r.png" alt=""> -->
* <dl>
* <dt><b>Backpressure:</b></dt>
* <dd>The operator honors backpressure from downstream. Both the outer and inner {@code Publisher}s are expected to honor
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
* in a bounded manner (up to {@code maxConcurrency} outstanding request amount for items).
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
*
* @param <U>
* the type of items emitted by the collection Publisher
* the type of items emitted by the inner Publishers
* @param <R>
* the type of items emitted by the resulting Publisher
* the type of items emitted by the combiner function
* @param mapper
* a function that returns a Publisher for each item emitted by the source Publisher
* @param combiner
Expand Down Expand Up @@ -8604,16 +8619,18 @@ public final <U, R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<
* <!-- <img width="640" height="390" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/mergeMap.r.png" alt=""> -->
* <dl>
* <dt><b>Backpressure:</b></dt>
* <dd>The operator honors backpressure from downstream. Both the outer and inner {@code Publisher}s are expected to honor
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
* in a bounded manner (up to {@code maxConcurrency} outstanding request amount for items).
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
*
* @param <U>
* the type of items emitted by the collection Publisher
* the type of items emitted by the inner Publishers
* @param <R>
* the type of items emitted by the resulting Publisher
* the type of items emitted by the combiner function
* @param mapper
* a function that returns a Publisher for each item emitted by the source Publisher
* @param combiner
Expand Down Expand Up @@ -8649,16 +8666,18 @@ public final <U, R> Flowable<R> flatMap(final Function<? super T, ? extends Publ
* <!-- <img width="640" height="390" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/mergeMap.r.png" alt=""> -->
* <dl>
* <dt><b>Backpressure:</b></dt>
* <dd>The operator honors backpressure from downstream. Both the outer and inner {@code Publisher}s are expected to honor
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
* in a bounded manner (up to {@link #bufferSize()} outstanding request amount for items).
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
* <dt><b>Scheduler:</b></dt>
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
* </dl>
*
* @param <U>
* the type of items emitted by the collection Publisher
* the type of items emitted by the inner Publishers
* @param <R>
* the type of items emitted by the resulting Publisher
* the type of items emitted by the combiner function
* @param mapper
* a function that returns a Publisher for each item emitted by the source Publisher
* @param combiner
Expand Down