@@ -140,6 +140,11 @@ public static int bufferSize() {
140
140
* Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of
141
141
* the source Publishers each time an item is received from any of the source Publishers, where this
142
142
* aggregation is defined by a specified function.
143
+ * <p>
144
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
145
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
146
+ * {@code Function<Integer[], R>} passed to the method would trigger a {@code ClassCastException}.
147
+ *
143
148
* <dl>
144
149
* <dt><b>Backpressure:</b></dt>
145
150
* <dd>The returned {@code Publisher} honors backpressure from downstream. The source {@code Publisher}s
@@ -163,14 +168,19 @@ public static int bufferSize() {
163
168
*/
164
169
@SchedulerSupport(SchedulerSupport.NONE)
165
170
@BackpressureSupport(BackpressureKind.FULL)
166
- public static <T, R> Flowable<R> combineLatest(Publisher<? extends T>[] sources, Function<? super T [], ? extends R> combiner) {
171
+ public static <T, R> Flowable<R> combineLatest(Publisher<? extends T>[] sources, Function<? super Object [], ? extends R> combiner) {
167
172
return combineLatest(sources, combiner, bufferSize());
168
173
}
169
174
170
175
/**
171
176
* Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of
172
177
* the source Publishers each time an item is received from any of the source Publishers, where this
173
178
* aggregation is defined by a specified function.
179
+ * <p>
180
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
181
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
182
+ * {@code Function<Integer[], R>} passed to the method would trigger a {@code ClassCastException}.
183
+ *
174
184
* <dl>
175
185
* <dt><b>Backpressure:</b></dt>
176
186
* <dd>The returned {@code Publisher} honors backpressure from downstream. The source {@code Publisher}s
@@ -194,14 +204,19 @@ public static <T, R> Flowable<R> combineLatest(Publisher<? extends T>[] sources,
194
204
*/
195
205
@SchedulerSupport(SchedulerSupport.NONE)
196
206
@BackpressureSupport(BackpressureKind.FULL)
197
- public static <T, R> Flowable<R> combineLatest(Function<? super T [], ? extends R> combiner, Publisher<? extends T>... sources) {
207
+ public static <T, R> Flowable<R> combineLatest(Function<? super Object [], ? extends R> combiner, Publisher<? extends T>... sources) {
198
208
return combineLatest(sources, combiner, bufferSize());
199
209
}
200
210
201
211
/**
202
212
* Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of
203
213
* the source Publishers each time an item is received from any of the source Publishers, where this
204
214
* aggregation is defined by a specified function.
215
+ * <p>
216
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
217
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
218
+ * {@code Function<Integer[], R>} passed to the method would trigger a {@code ClassCastException}.
219
+ *
205
220
* <dl>
206
221
* <dt><b>Backpressure:</b></dt>
207
222
* <dd>The returned {@code Publisher} honors backpressure from downstream. The source {@code Publisher}s
@@ -227,7 +242,7 @@ public static <T, R> Flowable<R> combineLatest(Function<? super T[], ? extends R
227
242
*/
228
243
@SchedulerSupport(SchedulerSupport.NONE)
229
244
@BackpressureSupport(BackpressureKind.FULL)
230
- public static <T, R> Flowable<R> combineLatest(Publisher<? extends T>[] sources, Function<? super T [], ? extends R> combiner, int bufferSize) {
245
+ public static <T, R> Flowable<R> combineLatest(Publisher<? extends T>[] sources, Function<? super Object [], ? extends R> combiner, int bufferSize) {
231
246
ObjectHelper.requireNonNull(sources, "sources is null");
232
247
if (sources.length == 0) {
233
248
return empty();
@@ -241,6 +256,11 @@ public static <T, R> Flowable<R> combineLatest(Publisher<? extends T>[] sources,
241
256
* Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of
242
257
* the source Publishers each time an item is received from any of the source Publishers, where this
243
258
* aggregation is defined by a specified function.
259
+ * <p>
260
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
261
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
262
+ * {@code Function<Integer[], R>} passed to the method would trigger a {@code ClassCastException}.
263
+ *
244
264
* <dl>
245
265
* <dt><b>Backpressure:</b></dt>
246
266
* <dd>The returned {@code Publisher} honors backpressure from downstream. The source {@code Publisher}s
@@ -265,14 +285,19 @@ public static <T, R> Flowable<R> combineLatest(Publisher<? extends T>[] sources,
265
285
@SchedulerSupport(SchedulerSupport.NONE)
266
286
@BackpressureSupport(BackpressureKind.FULL)
267
287
public static <T, R> Flowable<R> combineLatest(Iterable<? extends Publisher<? extends T>> sources,
268
- Function<? super T [], ? extends R> combiner) {
288
+ Function<? super Object [], ? extends R> combiner) {
269
289
return combineLatest(sources, combiner, bufferSize());
270
290
}
271
291
272
292
/**
273
293
* Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of
274
294
* the source Publishers each time an item is received from any of the source Publishers, where this
275
295
* aggregation is defined by a specified function.
296
+ * <p>
297
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
298
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
299
+ * {@code Function<Integer[], R>} passed to the method would trigger a {@code ClassCastException}.
300
+ *
276
301
* <dl>
277
302
* <dt><b>Backpressure:</b></dt>
278
303
* <dd>The returned {@code Publisher} honors backpressure from downstream. The source {@code Publisher}s
@@ -299,7 +324,7 @@ public static <T, R> Flowable<R> combineLatest(Iterable<? extends Publisher<? ex
299
324
@SchedulerSupport(SchedulerSupport.NONE)
300
325
@BackpressureSupport(BackpressureKind.FULL)
301
326
public static <T, R> Flowable<R> combineLatest(Iterable<? extends Publisher<? extends T>> sources,
302
- Function<? super T [], ? extends R> combiner, int bufferSize) {
327
+ Function<? super Object [], ? extends R> combiner, int bufferSize) {
303
328
ObjectHelper.requireNonNull(sources, "sources is null");
304
329
ObjectHelper.requireNonNull(combiner, "combiner is null");
305
330
ObjectHelper.verifyPositive(bufferSize, "bufferSize");
@@ -310,6 +335,11 @@ public static <T, R> Flowable<R> combineLatest(Iterable<? extends Publisher<? ex
310
335
* Combines a collection of source Publishers by emitting an item that aggregates the latest values of each of
311
336
* the source Publishers each time an item is received from any of the source Publishers, where this
312
337
* aggregation is defined by a specified function.
338
+ * <p>
339
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
340
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
341
+ * {@code Function<Integer[], R>} passed to the method would trigger a {@code ClassCastException}.
342
+ *
313
343
* <dl>
314
344
* <dt><b>Backpressure:</b></dt>
315
345
* <dd>The returned {@code Publisher} honors backpressure from downstream. The source {@code Publisher}s
@@ -334,7 +364,7 @@ public static <T, R> Flowable<R> combineLatest(Iterable<? extends Publisher<? ex
334
364
@SchedulerSupport(SchedulerSupport.NONE)
335
365
@BackpressureSupport(BackpressureKind.FULL)
336
366
public static <T, R> Flowable<R> combineLatestDelayError(Publisher<? extends T>[] sources,
337
- Function<? super T [], ? extends R> combiner) {
367
+ Function<? super Object [], ? extends R> combiner) {
338
368
return combineLatestDelayError(sources, combiner, bufferSize());
339
369
}
340
370
@@ -343,6 +373,10 @@ public static <T, R> Flowable<R> combineLatestDelayError(Publisher<? extends T>[
343
373
* the source Publishers each time an item is received from any of the source Publishers, where this
344
374
* aggregation is defined by a specified function and delays any error from the sources until
345
375
* all source Publishers terminate.
376
+ * <p>
377
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
378
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
379
+ * {@code Function<Integer[], R>} passed to the method would trigger a {@code ClassCastException}.
346
380
*
347
381
* <dl>
348
382
* <dt><b>Backpressure:</b></dt>
@@ -367,7 +401,7 @@ public static <T, R> Flowable<R> combineLatestDelayError(Publisher<? extends T>[
367
401
*/
368
402
@SchedulerSupport(SchedulerSupport.NONE)
369
403
@BackpressureSupport(BackpressureKind.FULL)
370
- public static <T, R> Flowable<R> combineLatestDelayError(Function<? super T [], ? extends R> combiner,
404
+ public static <T, R> Flowable<R> combineLatestDelayError(Function<? super Object [], ? extends R> combiner,
371
405
Publisher<? extends T>... sources) {
372
406
return combineLatestDelayError(sources, combiner, bufferSize());
373
407
}
@@ -377,6 +411,10 @@ public static <T, R> Flowable<R> combineLatestDelayError(Function<? super T[], ?
377
411
* the source ObservableSources each time an item is received from any of the source Publisher, where this
378
412
* aggregation is defined by a specified function and delays any error from the sources until
379
413
* all source Publishers terminate.
414
+ * <p>
415
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
416
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
417
+ * {@code Function<Integer[], R>} passed to the method would trigger a {@code ClassCastException}.
380
418
*
381
419
* <dl>
382
420
* <dt><b>Scheduler:</b></dt>
@@ -398,7 +436,7 @@ public static <T, R> Flowable<R> combineLatestDelayError(Function<? super T[], ?
398
436
* @see <a href="http://reactivex.io/documentation/operators/combinelatest.html">ReactiveX operators documentation: CombineLatest</a>
399
437
*/
400
438
@SchedulerSupport(SchedulerSupport.NONE)
401
- public static <T, R> Flowable<R> combineLatestDelayError(Function<? super T [], ? extends R> combiner,
439
+ public static <T, R> Flowable<R> combineLatestDelayError(Function<? super Object [], ? extends R> combiner,
402
440
int bufferSize, Publisher<? extends T>... sources) {
403
441
return combineLatestDelayError(sources, combiner, bufferSize);
404
442
}
@@ -408,6 +446,10 @@ public static <T, R> Flowable<R> combineLatestDelayError(Function<? super T[], ?
408
446
* the source Publishers each time an item is received from any of the source Publishers, where this
409
447
* aggregation is defined by a specified function and delays any error from the sources until
410
448
* all source Publishers terminate.
449
+ * <p>
450
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
451
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
452
+ * {@code Function<Integer[], R>} passed to the method would trigger a {@code ClassCastException}.
411
453
*
412
454
* <dl>
413
455
* <dt><b>Backpressure:</b></dt>
@@ -435,7 +477,7 @@ public static <T, R> Flowable<R> combineLatestDelayError(Function<? super T[], ?
435
477
@SchedulerSupport(SchedulerSupport.NONE)
436
478
@BackpressureSupport(BackpressureKind.FULL)
437
479
public static <T, R> Flowable<R> combineLatestDelayError(Publisher<? extends T>[] sources,
438
- Function<? super T [], ? extends R> combiner, int bufferSize) {
480
+ Function<? super Object [], ? extends R> combiner, int bufferSize) {
439
481
ObjectHelper.requireNonNull(sources, "sources is null");
440
482
ObjectHelper.requireNonNull(combiner, "combiner is null");
441
483
ObjectHelper.verifyPositive(bufferSize, "bufferSize");
@@ -450,6 +492,10 @@ public static <T, R> Flowable<R> combineLatestDelayError(Publisher<? extends T>[
450
492
* the source Publishers each time an item is received from any of the source Publishers, where this
451
493
* aggregation is defined by a specified function and delays any error from the sources until
452
494
* all source Publishers terminate.
495
+ * <p>
496
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
497
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
498
+ * {@code Function<Integer[], R>} passed to the method would trigger a {@code ClassCastException}.
453
499
*
454
500
* <dl>
455
501
* <dt><b>Backpressure:</b></dt>
@@ -475,7 +521,7 @@ public static <T, R> Flowable<R> combineLatestDelayError(Publisher<? extends T>[
475
521
@SchedulerSupport(SchedulerSupport.NONE)
476
522
@BackpressureSupport(BackpressureKind.FULL)
477
523
public static <T, R> Flowable<R> combineLatestDelayError(Iterable<? extends Publisher<? extends T>> sources,
478
- Function<? super T [], ? extends R> combiner) {
524
+ Function<? super Object [], ? extends R> combiner) {
479
525
return combineLatestDelayError(sources, combiner, bufferSize());
480
526
}
481
527
@@ -484,6 +530,10 @@ public static <T, R> Flowable<R> combineLatestDelayError(Iterable<? extends Publ
484
530
* the source Publishers each time an item is received from any of the source Publishers, where this
485
531
* aggregation is defined by a specified function and delays any error from the sources until
486
532
* all source Publishers terminate.
533
+ * <p>
534
+ * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
535
+ * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
536
+ * {@code Function<Integer[], R>} passed to the method would trigger a {@code ClassCastException}.
487
537
*
488
538
* <dl>
489
539
* <dt><b>Backpressure:</b></dt>
@@ -511,7 +561,7 @@ public static <T, R> Flowable<R> combineLatestDelayError(Iterable<? extends Publ
511
561
@SchedulerSupport(SchedulerSupport.NONE)
512
562
@BackpressureSupport(BackpressureKind.FULL)
513
563
public static <T, R> Flowable<R> combineLatestDelayError(Iterable<? extends Publisher<? extends T>> sources,
514
- Function<? super T [], ? extends R> combiner, int bufferSize) {
564
+ Function<? super Object [], ? extends R> combiner, int bufferSize) {
515
565
ObjectHelper.requireNonNull(sources, "sources is null");
516
566
ObjectHelper.requireNonNull(combiner, "combiner is null");
517
567
ObjectHelper.verifyPositive(bufferSize, "bufferSize");
@@ -14955,4 +15005,4 @@ public final TestSubscriber<T> test(long initialRequest, boolean cancel) { // No
14955
15005
return ts;
14956
15006
}
14957
15007
14958
- }
15008
+ }
0 commit comments