Skip to content

Commit 47e759b

Browse files
committed
2.x: Add empty source clauses to javadocs of combineLatest operators accepting unspecified number of sources. This commit resolves #5412
1 parent 84d333e commit 47e759b

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ public static int bufferSize() {
150150
* If any of the sources never produces an item but only terminates (normally or with an error), the
151151
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
152152
* If that input source is also synchronous, other sources after it will not be subscribed to.
153+
* <p>
154+
* If provided array of source Publishers is empty, resulting sequence completes immediately without emitting
155+
* any items and without any calls to combiner function.
153156
*
154157
* <dl>
155158
* <dt><b>Backpressure:</b></dt>
@@ -191,6 +194,9 @@ public static <T, R> Flowable<R> combineLatest(Publisher<? extends T>[] sources,
191194
* If any of the sources never produces an item but only terminates (normally or with an error), the
192195
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
193196
* If that input source is also synchronous, other sources after it will not be subscribed to.
197+
* <p>
198+
* If there are no source Publishers provided, resulting sequence completes immediately without emitting
199+
* any items and without any calls to combiner function.
194200
*
195201
* <dl>
196202
* <dt><b>Backpressure:</b></dt>
@@ -232,6 +238,9 @@ public static <T, R> Flowable<R> combineLatest(Function<? super Object[], ? exte
232238
* If any of the sources never produces an item but only terminates (normally or with an error), the
233239
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
234240
* If that input source is also synchronous, other sources after it will not be subscribed to.
241+
* <p>
242+
* If provided array of source Publishers is empty, resulting sequence completes immediately without emitting
243+
* any items and without any calls to combiner function.
235244
*
236245
* <dl>
237246
* <dt><b>Backpressure:</b></dt>
@@ -281,6 +290,9 @@ public static <T, R> Flowable<R> combineLatest(Publisher<? extends T>[] sources,
281290
* If any of the sources never produces an item but only terminates (normally or with an error), the
282291
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
283292
* If that input source is also synchronous, other sources after it will not be subscribed to.
293+
* <p>
294+
* If provided iterable of source Publishers is empty, resulting sequence completes immediately without emitting
295+
* any items and without any calls to combiner function.
284296
*
285297
* <dl>
286298
* <dt><b>Backpressure:</b></dt>
@@ -323,6 +335,9 @@ public static <T, R> Flowable<R> combineLatest(Iterable<? extends Publisher<? ex
323335
* If any of the sources never produces an item but only terminates (normally or with an error), the
324336
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
325337
* If that input source is also synchronous, other sources after it will not be subscribed to.
338+
* <p>
339+
* If provided iterable of source Publishers is empty, resulting sequence completes immediately without emitting any items and
340+
* without any calls to combiner function.
326341
*
327342
* <dl>
328343
* <dt><b>Backpressure:</b></dt>
@@ -370,6 +385,9 @@ public static <T, R> Flowable<R> combineLatest(Iterable<? extends Publisher<? ex
370385
* If any of the sources never produces an item but only terminates (normally or with an error), the
371386
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
372387
* If that input source is also synchronous, other sources after it will not be subscribed to.
388+
* <p>
389+
* If provided array of source Publishers is empty, resulting sequence completes immediately without emitting
390+
* any items and without any calls to combiner function.
373391
*
374392
* <dl>
375393
* <dt><b>Backpressure:</b></dt>
@@ -413,6 +431,9 @@ public static <T, R> Flowable<R> combineLatestDelayError(Publisher<? extends T>[
413431
* If any of the sources never produces an item but only terminates (normally or with an error), the
414432
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
415433
* If that input source is also synchronous, other sources after it will not be subscribed to.
434+
* <p>
435+
* If there are no source Publishers provided, resulting sequence completes immediately without emitting
436+
* any items and without any calls to combiner function.
416437
*
417438
* <dl>
418439
* <dt><b>Backpressure:</b></dt>
@@ -456,6 +477,9 @@ public static <T, R> Flowable<R> combineLatestDelayError(Function<? super Object
456477
* If any of the sources never produces an item but only terminates (normally or with an error), the
457478
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
458479
* If that input source is also synchronous, other sources after it will not be subscribed to.
480+
* <p>
481+
* If there are no source Publishers provided, resulting sequence completes immediately without emitting
482+
* any items and without any calls to combiner function.
459483
*
460484
* <dl>
461485
* <dt><b>Backpressure:</b></dt>
@@ -501,6 +525,9 @@ public static <T, R> Flowable<R> combineLatestDelayError(Function<? super Object
501525
* If any of the sources never produces an item but only terminates (normally or with an error), the
502526
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
503527
* If that input source is also synchronous, other sources after it will not be subscribed to.
528+
* <p>
529+
* If provided array of source Publishers is empty, resulting sequence completes immediately without emitting
530+
* any items and without any calls to combiner function.
504531
*
505532
* <dl>
506533
* <dt><b>Backpressure:</b></dt>
@@ -552,6 +579,9 @@ public static <T, R> Flowable<R> combineLatestDelayError(Publisher<? extends T>[
552579
* If any of the sources never produces an item but only terminates (normally or with an error), the
553580
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
554581
* If that input source is also synchronous, other sources after it will not be subscribed to.
582+
* <p>
583+
* If provided iterable of source Publishers is empty, resulting sequence completes immediately without emitting
584+
* any items and without any calls to combiner function.
555585
*
556586
* <dl>
557587
* <dt><b>Backpressure:</b></dt>
@@ -595,6 +625,9 @@ public static <T, R> Flowable<R> combineLatestDelayError(Iterable<? extends Publ
595625
* If any of the sources never produces an item but only terminates (normally or with an error), the
596626
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
597627
* If that input source is also synchronous, other sources after it will not be subscribed to.
628+
* <p>
629+
* If provided iterable of source Publishers is empty, resulting sequence completes immediately without emitting
630+
* any items and without any calls to combiner function.
598631
*
599632
* <dl>
600633
* <dt><b>Backpressure:</b></dt>

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

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ public static int bufferSize() {
139139
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
140140
* If that input source is also synchronous, other sources after it will not be subscribed to.
141141
* <p>
142+
* If there are no ObservableSources provided, resulting sequence completes immediately without emitting
143+
* any items and without any calls to combiner function.
144+
*
145+
* <p>
142146
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/combineLatest.png" alt="">
143147
* <dl>
144148
* <dt><b>Scheduler:</b></dt>
@@ -178,6 +182,10 @@ public static <T, R> Observable<R> combineLatest(Function<? super Object[], ? ex
178182
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
179183
* If that input source is also synchronous, other sources after it will not be subscribed to.
180184
* <p>
185+
* If provided iterable of ObservableSources is empty resulting sequence completes immediately without emitting
186+
* any items and without any calls to combiner function.
187+
*
188+
* <p>
181189
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/combineLatest.png" alt="">
182190
* <dl>
183191
* <dt><b>Scheduler:</b></dt>
@@ -216,6 +224,10 @@ public static <T, R> Observable<R> combineLatest(Iterable<? extends ObservableSo
216224
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
217225
* If that input source is also synchronous, other sources after it will not be subscribed to.
218226
* <p>
227+
* If provided iterable of ObservableSources is empty, resulting sequence completes immediately without emitting
228+
* any items and without any calls to combiner function.
229+
*
230+
* <p>
219231
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/combineLatest.png" alt="">
220232
* <dl>
221233
* <dt><b>Scheduler:</b></dt>
@@ -262,6 +274,10 @@ public static <T, R> Observable<R> combineLatest(Iterable<? extends ObservableSo
262274
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
263275
* If that input source is also synchronous, other sources after it will not be subscribed to.
264276
* <p>
277+
* If provided array of ObservableSources is empty, resulting sequence completes immediately without emitting
278+
* any items and without any calls to combiner function.
279+
*
280+
* <p>
265281
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/combineLatest.png" alt="">
266282
* <dl>
267283
* <dt><b>Scheduler:</b></dt>
@@ -300,6 +316,10 @@ public static <T, R> Observable<R> combineLatest(ObservableSource<? extends T>[]
300316
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
301317
* If that input source is also synchronous, other sources after it will not be subscribed to.
302318
* <p>
319+
* If provided array of ObservableSources is empty, resulting sequence completes immediately without emitting
320+
* any items and without any calls to combiner function.
321+
*
322+
* <p>
303323
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/combineLatest.png" alt="">
304324
* <dl>
305325
* <dt><b>Scheduler:</b></dt>
@@ -790,6 +810,9 @@ public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, R> Observable<R> combineLates
790810
* If any of the sources never produces an item but only terminates (normally or with an error), the
791811
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
792812
* If that input source is also synchronous, other sources after it will not be subscribed to.
813+
* <p>
814+
* If provided array of ObservableSources is empty, resulting sequence completes immediately without emitting
815+
* any items and without any calls to combiner function.
793816
*
794817
* <dl>
795818
* <dt><b>Scheduler:</b></dt>
@@ -830,6 +853,9 @@ public static <T, R> Observable<R> combineLatestDelayError(ObservableSource<? ex
830853
* If any of the sources never produces an item but only terminates (normally or with an error), the
831854
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
832855
* If that input source is also synchronous, other sources after it will not be subscribed to.
856+
* <p>
857+
* If there are no ObservableSources provided, resulting sequence completes immediately without emitting
858+
* any items and without any calls to combiner function.
833859
*
834860
* <dl>
835861
* <dt><b>Scheduler:</b></dt>
@@ -871,6 +897,10 @@ public static <T, R> Observable<R> combineLatestDelayError(Function<? super Obje
871897
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
872898
* If that input source is also synchronous, other sources after it will not be subscribed to.
873899
* <p>
900+
* If provided array of ObservableSources is empty, resulting sequence completes immediately without emitting
901+
* any items and without any calls to combiner function.
902+
*
903+
* <p>
874904
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/combineLatestDelayError.png" alt="">
875905
* <dl>
876906
* <dt><b>Scheduler:</b></dt>
@@ -919,6 +949,10 @@ public static <T, R> Observable<R> combineLatestDelayError(ObservableSource<? ex
919949
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
920950
* If that input source is also synchronous, other sources after it will not be subscribed to.
921951
* <p>
952+
* If provided iterable of ObservableSources is empty, resulting sequence completes immediately without emitting
953+
* any items and without any calls to combiner function.
954+
*
955+
* <p>
922956
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/combineLatestDelayError.png" alt="">
923957
* <dl>
924958
* <dt><b>Scheduler:</b></dt>
@@ -958,6 +992,10 @@ public static <T, R> Observable<R> combineLatestDelayError(Iterable<? extends Ob
958992
* resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
959993
* If that input source is also synchronous, other sources after it will not be subscribed to.
960994
* <p>
995+
* If provided iterable of ObservableSources is empty, resulting sequence completes immediately without emitting
996+
* any items and without any calls to combiner function.
997+
*
998+
* <p>
961999
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/combineLatestDelayError.png" alt="">
9621000
* <dl>
9631001
* <dt><b>Scheduler:</b></dt>

0 commit comments

Comments
 (0)