Skip to content

Commit 7494a2c

Browse files
authored
2.x: update javadoc of flatMap() overloads (ReactiveX#5127)
1 parent 70922a6 commit 7494a2c

File tree

1 file changed

+61
-42
lines changed

1 file changed

+61
-42
lines changed

src/main/java/io/reactivex/Flowable.java

Lines changed: 61 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -8216,9 +8216,10 @@ public final Single<T> firstOrError() {
82168216
* <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/flatMap.png" alt="">
82178217
* <dl>
82188218
* <dt><b>Backpressure:</b></dt>
8219-
* <dd>The operator honors backpressure from downstream. The outer {@code Publisher} is consumed
8220-
* in unbounded mode (i.e., no backpressure is applied to it). The inner {@code Publisher}s are expected to honor
8221-
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
8219+
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
8220+
* in a bounded manner (up to {@link #bufferSize()} outstanding request amount for items).
8221+
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
8222+
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
82228223
* <dt><b>Scheduler:</b></dt>
82238224
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
82248225
* </dl>
@@ -8247,9 +8248,10 @@ public final <R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<? e
82478248
* <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/flatMap.png" alt="">
82488249
* <dl>
82498250
* <dt><b>Backpressure:</b></dt>
8250-
* <dd>The operator honors backpressure from downstream. The outer {@code Publisher} is consumed
8251-
* in unbounded mode (i.e., no backpressure is applied to it). The inner {@code Publisher}s are expected to honor
8252-
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
8251+
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
8252+
* in a bounded manner (up to {@link #bufferSize()} outstanding request amount for items).
8253+
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
8254+
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
82538255
* <dt><b>Scheduler:</b></dt>
82548256
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
82558257
* </dl>
@@ -8282,8 +8284,10 @@ public final <R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<? e
82828284
* <!-- <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/flatMap.png" alt=""> -->
82838285
* <dl>
82848286
* <dt><b>Backpressure:</b></dt>
8285-
* <dd>The operator honors backpressure from downstream. Both the outer and inner {@code Publisher}s are expected to honor
8286-
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
8287+
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
8288+
* in a bounded manner (up to {@code maxConcurrency} outstanding request amount for items).
8289+
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
8290+
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
82878291
* <dt><b>Scheduler:</b></dt>
82888292
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
82898293
* </dl>
@@ -8316,8 +8320,10 @@ public final <R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<? e
83168320
* <!-- <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/flatMap.png" alt=""> -->
83178321
* <dl>
83188322
* <dt><b>Backpressure:</b></dt>
8319-
* <dd>The operator honors backpressure from downstream. Both the outer and inner {@code Publisher}s are expected to honor
8320-
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
8323+
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
8324+
* in a bounded manner (up to {@code maxConcurrency} outstanding request amount for items).
8325+
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
8326+
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
83218327
* <dt><b>Scheduler:</b></dt>
83228328
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
83238329
* </dl>
@@ -8353,8 +8359,10 @@ public final <R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<? e
83538359
* <!-- <img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/flatMap.png" alt=""> -->
83548360
* <dl>
83558361
* <dt><b>Backpressure:</b></dt>
8356-
* <dd>The operator honors backpressure from downstream. Both the outer and inner {@code Publisher}s are expected to honor
8357-
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
8362+
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
8363+
* in a bounded manner (up to {@code maxConcurrency} outstanding request amount for items).
8364+
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
8365+
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
83588366
* <dt><b>Scheduler:</b></dt>
83598367
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
83608368
* </dl>
@@ -8402,9 +8410,10 @@ public final <R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<? e
84028410
* <img width="640" height="410" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/mergeMap.nce.png" alt="">
84038411
* <dl>
84048412
* <dt><b>Backpressure:</b></dt>
8405-
* <dd>The operator honors backpressure from downstream. The outer {@code Publisher} is consumed
8406-
* in unbounded mode (i.e., no backpressure is applied to it). The inner {@code Publisher}s are expected to honor
8407-
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
8413+
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
8414+
* in a bounded manner (up to {@link #bufferSize()} outstanding request amount for items).
8415+
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
8416+
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
84088417
* <dt><b>Scheduler:</b></dt>
84098418
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
84108419
* </dl>
@@ -8444,8 +8453,10 @@ public final <R> Flowable<R> flatMap(
84448453
* <!-- <img width="640" height="410" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/mergeMap.nce.png" alt=""> -->
84458454
* <dl>
84468455
* <dt><b>Backpressure:</b></dt>
8447-
* <dd>The operator honors backpressure from downstream. Both the outer and inner {@code Publisher}s are expected to honor
8448-
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
8456+
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
8457+
* in a bounded manner (up to {@code maxConcurrency} outstanding request amount for items).
8458+
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
8459+
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
84498460
* <dt><b>Scheduler:</b></dt>
84508461
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
84518462
* </dl>
@@ -8489,20 +8500,21 @@ public final <R> Flowable<R> flatMap(
84898500
* <img width="640" height="390" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/mergeMap.r.png" alt="">
84908501
* <dl>
84918502
* <dt><b>Backpressure:</b></dt>
8492-
* <dd>The operator honors backpressure from downstream. The outer {@code Publisher} is consumed
8493-
* in unbounded mode (i.e., no backpressure is applied to it). The inner {@code Publisher}s are expected to honor
8494-
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
8503+
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
8504+
* in a bounded manner (up to {@code maxConcurrency} outstanding request amount for items).
8505+
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
8506+
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
84958507
* <dt><b>Scheduler:</b></dt>
84968508
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
84978509
* </dl>
84988510
*
84998511
* @param <U>
8500-
* the type of items emitted by the collection Publisher
8512+
* the type of items emitted by the inner Publishers
85018513
* @param <R>
8502-
* the type of items emitted by the resulting Publisher
8514+
* the type of items emitted by the combiner function
85038515
* @param mapper
85048516
* a function that returns a Publisher for each item emitted by the source Publisher
8505-
* @param resultSelector
8517+
* @param combiner
85068518
* a function that combines one item emitted by each of the source and collection Publishers and
85078519
* returns an item to be emitted by the resulting Publisher
85088520
* @return a Flowable that emits the results of applying a function to a pair of values emitted by the
@@ -8513,8 +8525,8 @@ public final <R> Flowable<R> flatMap(
85138525
@BackpressureSupport(BackpressureKind.FULL)
85148526
@SchedulerSupport(SchedulerSupport.NONE)
85158527
public final <U, R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<? extends U>> mapper,
8516-
BiFunction<? super T, ? super U, ? extends R> resultSelector) {
8517-
return flatMap(mapper, resultSelector, false, bufferSize(), bufferSize());
8528+
BiFunction<? super T, ? super U, ? extends R> combiner) {
8529+
return flatMap(mapper, combiner, false, bufferSize(), bufferSize());
85188530
}
85198531

85208532
/**
@@ -8524,17 +8536,18 @@ public final <U, R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<
85248536
* <img width="640" height="390" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/mergeMap.r.png" alt="">
85258537
* <dl>
85268538
* <dt><b>Backpressure:</b></dt>
8527-
* <dd>The operator honors backpressure from downstream. The outer {@code Publisher} is consumed
8528-
* in unbounded mode (i.e., no backpressure is applied to it). The inner {@code Publisher}s are expected to honor
8529-
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
8539+
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
8540+
* in a bounded manner (up to {@link #bufferSize()} outstanding request amount for items).
8541+
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
8542+
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
85308543
* <dt><b>Scheduler:</b></dt>
85318544
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
85328545
* </dl>
85338546
*
85348547
* @param <U>
8535-
* the type of items emitted by the collection Publisher
8548+
* the type of items emitted by the inner Publishers
85368549
* @param <R>
8537-
* the type of items emitted by the resulting Publisher
8550+
* the type of items emitted by the combiner functions
85388551
* @param mapper
85398552
* a function that returns a Publisher for each item emitted by the source Publisher
85408553
* @param combiner
@@ -8563,16 +8576,18 @@ public final <U, R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<
85638576
* <!-- <img width="640" height="390" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/mergeMap.r.png" alt=""> -->
85648577
* <dl>
85658578
* <dt><b>Backpressure:</b></dt>
8566-
* <dd>The operator honors backpressure from downstream. Both the outer and inner {@code Publisher}s are expected to honor
8567-
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
8579+
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
8580+
* in a bounded manner (up to {@code maxConcurrency} outstanding request amount for items).
8581+
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
8582+
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
85688583
* <dt><b>Scheduler:</b></dt>
85698584
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
85708585
* </dl>
85718586
*
85728587
* @param <U>
8573-
* the type of items emitted by the collection Publisher
8588+
* the type of items emitted by the inner Publishers
85748589
* @param <R>
8575-
* the type of items emitted by the resulting Publisher
8590+
* the type of items emitted by the combiner function
85768591
* @param mapper
85778592
* a function that returns a Publisher for each item emitted by the source Publisher
85788593
* @param combiner
@@ -8604,16 +8619,18 @@ public final <U, R> Flowable<R> flatMap(Function<? super T, ? extends Publisher<
86048619
* <!-- <img width="640" height="390" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/mergeMap.r.png" alt=""> -->
86058620
* <dl>
86068621
* <dt><b>Backpressure:</b></dt>
8607-
* <dd>The operator honors backpressure from downstream. Both the outer and inner {@code Publisher}s are expected to honor
8608-
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
8622+
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
8623+
* in a bounded manner (up to {@code maxConcurrency} outstanding request amount for items).
8624+
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
8625+
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
86098626
* <dt><b>Scheduler:</b></dt>
86108627
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
86118628
* </dl>
86128629
*
86138630
* @param <U>
8614-
* the type of items emitted by the collection Publisher
8631+
* the type of items emitted by the inner Publishers
86158632
* @param <R>
8616-
* the type of items emitted by the resulting Publisher
8633+
* the type of items emitted by the combiner function
86178634
* @param mapper
86188635
* a function that returns a Publisher for each item emitted by the source Publisher
86198636
* @param combiner
@@ -8649,16 +8666,18 @@ public final <U, R> Flowable<R> flatMap(final Function<? super T, ? extends Publ
86498666
* <!-- <img width="640" height="390" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/mergeMap.r.png" alt=""> -->
86508667
* <dl>
86518668
* <dt><b>Backpressure:</b></dt>
8652-
* <dd>The operator honors backpressure from downstream. Both the outer and inner {@code Publisher}s are expected to honor
8653-
* backpressure; if violated, the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
8669+
* <dd>The operator honors backpressure from downstream. The upstream Flowable is consumed
8670+
* in a bounded manner (up to {@link #bufferSize()} outstanding request amount for items).
8671+
* The inner {@code Publisher}s are expected to honor backpressure; if violated,
8672+
* the operator <em>may</em> signal {@code MissingBackpressureException}.</dd>
86548673
* <dt><b>Scheduler:</b></dt>
86558674
* <dd>{@code flatMap} does not operate by default on a particular {@link Scheduler}.</dd>
86568675
* </dl>
86578676
*
86588677
* @param <U>
8659-
* the type of items emitted by the collection Publisher
8678+
* the type of items emitted by the inner Publishers
86608679
* @param <R>
8661-
* the type of items emitted by the resulting Publisher
8680+
* the type of items emitted by the combiner function
86628681
* @param mapper
86638682
* a function that returns a Publisher for each item emitted by the source Publisher
86648683
* @param combiner

0 commit comments

Comments
 (0)