@@ -2800,6 +2800,40 @@ public static <T1, T2, R> Observable<R> zip(Observable<? extends T1> o1, Observa
2800
2800
return create (OperationZip .zip (o1 , o2 , zipFunction ));
2801
2801
}
2802
2802
2803
+ /**
2804
+ * Return an Observable that pairs up values from this Observable and the other
2805
+ * Observable and applies a function.
2806
+ * @param <T2> the other value type
2807
+ * @param <R> the result type
2808
+ * @param other the other Observable sequence
2809
+ * @param zipFunction the function that combines the pairs of items from both
2810
+ * observables and returns a new value
2811
+ * @return an Observable that pairs up values from this Observable and the other
2812
+ * Observable and applies a function.
2813
+ */
2814
+ public <T2 , R > Observable <R > zip (Observable <? extends T2 > other , Func2 <? super T , ? super T2 , ? extends R > zipFunction ) {
2815
+ return zip (this , other , zipFunction );
2816
+ }
2817
+
2818
+ /**
2819
+ * Return an Observable that pairs up values from this Observable and an
2820
+ * Iterable sequence and applies a function.
2821
+ * <p>
2822
+ * Note that the other Iterable is evaluated as items appear from this
2823
+ * Observable and is not pre-consumed, allowing zipping infinite streams
2824
+ * on either side.
2825
+ * @param <T2> the other value type
2826
+ * @param <R> the result type
2827
+ * @param other the other Iterable sequence
2828
+ * @param zipFunction the function that combines the pairs of items of
2829
+ * this Observable and the Iterable
2830
+ * @return an Observable that pairs up values from this Observable and an
2831
+ * Iterable sequence and applies a function.
2832
+ */
2833
+ public <T2 , R > Observable <R > zip (Iterable <? extends T2 > other , Func2 <? super T , ? super T2 , ? extends R > zipFunction ) {
2834
+ return create (OperationZip .zipIterable (this , other , zipFunction ));
2835
+ }
2836
+
2803
2837
/**
2804
2838
* Returns an Observable that emits the results of a function of your
2805
2839
* choosing applied to combinations of three items emitted, in sequence, by
0 commit comments