@@ -168,49 +168,6 @@ public static int bufferSize() {
168
168
return Flowable.bufferSize();
169
169
}
170
170
171
- /**
172
- * Combines a collection of source ObservableSources by emitting an item that aggregates the latest values of each of
173
- * the source ObservableSources each time an item is received from any of the source ObservableSources, where this
174
- * aggregation is defined by a specified function.
175
- * <p>
176
- * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
177
- * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
178
- * {@code Function<Integer[], R>} passed to the method would trigger a {@code ClassCastException}.
179
- * <p>
180
- * If any of the sources never produces an item but only terminates (normally or with an error), the
181
- * resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
182
- * If that input source is also synchronous, other sources after it will not be subscribed to.
183
- * <p>
184
- * If there are no ObservableSources provided, the resulting sequence completes immediately without emitting
185
- * any items and without any calls to the combiner function.
186
- *
187
- * <p>
188
- * <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/combineLatest.png" alt="">
189
- * <dl>
190
- * <dt><b>Scheduler:</b></dt>
191
- * <dd>{@code combineLatest} does not operate by default on a particular {@link Scheduler}.</dd>
192
- * </dl>
193
- *
194
- * @param <T>
195
- * the common base type of source values
196
- * @param <R>
197
- * the result type
198
- * @param sources
199
- * the collection of source ObservableSources
200
- * @param combiner
201
- * the aggregation function used to combine the items emitted by the source ObservableSources
202
- * @param bufferSize
203
- * the internal buffer size and prefetch amount applied to every source Observable
204
- * @return an Observable that emits items that are the result of combining the items emitted by the source
205
- * ObservableSources by means of the given aggregation function
206
- * @see <a href="http://reactivex.io/documentation/operators/combinelatest.html">ReactiveX operators documentation: CombineLatest</a>
207
- */
208
- @CheckReturnValue
209
- @SchedulerSupport(SchedulerSupport.NONE)
210
- public static <T, R> Observable<R> combineLatest(Function<? super Object[], ? extends R> combiner, int bufferSize, ObservableSource<? extends T>... sources) {
211
- return combineLatest(sources, combiner, bufferSize);
212
- }
213
-
214
171
/**
215
172
* Combines a collection of source ObservableSources by emitting an item that aggregates the latest values of each of
216
173
* the source ObservableSources each time an item is received from any of the source ObservableSources, where this
@@ -437,7 +394,7 @@ public static <T1, T2, R> Observable<R> combineLatest(
437
394
BiFunction<? super T1, ? super T2, ? extends R> combiner) {
438
395
ObjectHelper.requireNonNull(source1, "source1 is null");
439
396
ObjectHelper.requireNonNull(source2, "source2 is null");
440
- return combineLatest(Functions.toFunction(combiner), bufferSize(), source1, source2 );
397
+ return combineLatest(new ObservableSource[] { source1, source2 }, Functions.toFunction(combiner), bufferSize());
441
398
}
442
399
443
400
/**
@@ -482,7 +439,7 @@ public static <T1, T2, T3, R> Observable<R> combineLatest(
482
439
ObjectHelper.requireNonNull(source1, "source1 is null");
483
440
ObjectHelper.requireNonNull(source2, "source2 is null");
484
441
ObjectHelper.requireNonNull(source3, "source3 is null");
485
- return combineLatest(Functions.toFunction(combiner), bufferSize(), source1, source2, source3 );
442
+ return combineLatest(new ObservableSource[] { source1, source2, source3 }, Functions.toFunction(combiner), bufferSize());
486
443
}
487
444
488
445
/**
@@ -531,7 +488,7 @@ public static <T1, T2, T3, T4, R> Observable<R> combineLatest(
531
488
ObjectHelper.requireNonNull(source2, "source2 is null");
532
489
ObjectHelper.requireNonNull(source3, "source3 is null");
533
490
ObjectHelper.requireNonNull(source4, "source4 is null");
534
- return combineLatest(Functions.toFunction(combiner), bufferSize(), source1, source2, source3, source4);
491
+ return combineLatest(new ObservableSource[] { source1, source2, source3, source4 }, Functions.toFunction(combiner), bufferSize() );
535
492
}
536
493
537
494
/**
@@ -585,7 +542,7 @@ public static <T1, T2, T3, T4, T5, R> Observable<R> combineLatest(
585
542
ObjectHelper.requireNonNull(source3, "source3 is null");
586
543
ObjectHelper.requireNonNull(source4, "source4 is null");
587
544
ObjectHelper.requireNonNull(source5, "source5 is null");
588
- return combineLatest(Functions.toFunction(combiner), bufferSize(), source1, source2, source3, source4, source5);
545
+ return combineLatest(new ObservableSource[] { source1, source2, source3, source4, source5 }, Functions.toFunction(combiner), bufferSize() );
589
546
}
590
547
591
548
/**
@@ -643,7 +600,7 @@ public static <T1, T2, T3, T4, T5, T6, R> Observable<R> combineLatest(
643
600
ObjectHelper.requireNonNull(source4, "source4 is null");
644
601
ObjectHelper.requireNonNull(source5, "source5 is null");
645
602
ObjectHelper.requireNonNull(source6, "source6 is null");
646
- return combineLatest(Functions.toFunction(combiner), bufferSize(), source1, source2, source3, source4, source5, source6);
603
+ return combineLatest(new ObservableSource[] { source1, source2, source3, source4, source5, source6 }, Functions.toFunction(combiner), bufferSize() );
647
604
}
648
605
649
606
/**
@@ -706,7 +663,7 @@ public static <T1, T2, T3, T4, T5, T6, T7, R> Observable<R> combineLatest(
706
663
ObjectHelper.requireNonNull(source5, "source5 is null");
707
664
ObjectHelper.requireNonNull(source6, "source6 is null");
708
665
ObjectHelper.requireNonNull(source7, "source7 is null");
709
- return combineLatest(Functions.toFunction(combiner), bufferSize(), source1, source2, source3, source4, source5, source6, source7);
666
+ return combineLatest(new ObservableSource[] { source1, source2, source3, source4, source5, source6, source7 }, Functions.toFunction(combiner), bufferSize() );
710
667
}
711
668
712
669
/**
@@ -773,7 +730,7 @@ public static <T1, T2, T3, T4, T5, T6, T7, T8, R> Observable<R> combineLatest(
773
730
ObjectHelper.requireNonNull(source6, "source6 is null");
774
731
ObjectHelper.requireNonNull(source7, "source7 is null");
775
732
ObjectHelper.requireNonNull(source8, "source8 is null");
776
- return combineLatest(Functions.toFunction(combiner), bufferSize(), source1, source2, source3, source4, source5, source6, source7, source8);
733
+ return combineLatest(new ObservableSource[] { source1, source2, source3, source4, source5, source6, source7, source8 }, Functions.toFunction(combiner), bufferSize() );
777
734
}
778
735
779
736
/**
@@ -845,7 +802,7 @@ public static <T1, T2, T3, T4, T5, T6, T7, T8, T9, R> Observable<R> combineLates
845
802
ObjectHelper.requireNonNull(source7, "source7 is null");
846
803
ObjectHelper.requireNonNull(source8, "source8 is null");
847
804
ObjectHelper.requireNonNull(source9, "source9 is null");
848
- return combineLatest(Functions.toFunction(combiner), bufferSize(), source1, source2, source3, source4, source5, source6, source7, source8, source9);
805
+ return combineLatest(new ObservableSource[] { source1, source2, source3, source4, source5, source6, source7, source8, source9 }, Functions.toFunction(combiner), bufferSize() );
849
806
}
850
807
851
808
/**
@@ -890,51 +847,6 @@ public static <T, R> Observable<R> combineLatestDelayError(ObservableSource<? ex
890
847
return combineLatestDelayError(sources, combiner, bufferSize());
891
848
}
892
849
893
- /**
894
- * Combines a collection of source ObservableSources by emitting an item that aggregates the latest values of each of
895
- * the source ObservableSources each time an item is received from any of the source ObservableSources, where this
896
- * aggregation is defined by a specified function and delays any error from the sources until
897
- * all source ObservableSources terminate.
898
- * <p>
899
- * <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/combineLatestDelayError.png" alt="">
900
- * <p>
901
- * Note on method signature: since Java doesn't allow creating a generic array with {@code new T[]}, the
902
- * implementation of this operator has to create an {@code Object[]} instead. Unfortunately, a
903
- * {@code Function<Integer[], R>} passed to the method would trigger a {@code ClassCastException}.
904
- * <p>
905
- * If any of the sources never produces an item but only terminates (normally or with an error), the
906
- * resulting sequence terminates immediately (normally or with all the errors accumulated till that point).
907
- * If that input source is also synchronous, other sources after it will not be subscribed to.
908
- * <p>
909
- * If there are no ObservableSources provided, the resulting sequence completes immediately without emitting
910
- * any items and without any calls to the combiner function.
911
- *
912
- * <dl>
913
- * <dt><b>Scheduler:</b></dt>
914
- * <dd>{@code combineLatestDelayError} does not operate by default on a particular {@link Scheduler}.</dd>
915
- * </dl>
916
- *
917
- * @param <T>
918
- * the common base type of source values
919
- * @param <R>
920
- * the result type
921
- * @param sources
922
- * the collection of source ObservableSources
923
- * @param combiner
924
- * the aggregation function used to combine the items emitted by the source ObservableSources
925
- * @param bufferSize
926
- * the internal buffer size and prefetch amount applied to every source Observable
927
- * @return an Observable that emits items that are the result of combining the items emitted by the source
928
- * ObservableSources by means of the given aggregation function
929
- * @see <a href="http://reactivex.io/documentation/operators/combinelatest.html">ReactiveX operators documentation: CombineLatest</a>
930
- */
931
- @CheckReturnValue
932
- @SchedulerSupport(SchedulerSupport.NONE)
933
- public static <T, R> Observable<R> combineLatestDelayError(Function<? super Object[], ? extends R> combiner,
934
- int bufferSize, ObservableSource<? extends T>... sources) {
935
- return combineLatestDelayError(sources, combiner, bufferSize);
936
- }
937
-
938
850
/**
939
851
* Combines a collection of source ObservableSources by emitting an item that aggregates the latest values of each of
940
852
* the source ObservableSources each time an item is received from any of the source ObservableSources, where this
0 commit comments