@@ -9924,10 +9924,43 @@ public final <U> Observable<Observable<T>> window(Observable<U> boundary) {
9924
9924
* sequence and emits the results of {@code zipFunction} applied to these pairs
9925
9925
* @see <a href="https://github.com/Netflix/RxJava/wiki/Combining-Observables#zip">RxJava wiki: zip</a>
9926
9926
* @see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.linq.observable.zip.aspx">MSDN: Observable.Zip</a>
9927
+ * @deprecated use zipWith
9927
9928
*/
9929
+ @Deprecated
9928
9930
public final <T2, R> Observable<R> zip(Iterable<? extends T2> other, Func2<? super T, ? super T2, ? extends R> zipFunction) {
9929
9931
return lift(new OperatorZipIterable<T, T2, R>(other, zipFunction));
9930
9932
}
9933
+
9934
+ /**
9935
+ * Returns an Observable that emits items that are the result of applying a specified function to pairs of
9936
+ * values, one each from the source Observable and a specified Iterable sequence.
9937
+ * <p>
9938
+ * <img width="640" height="380" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/zip.i.png" alt="">
9939
+ * <p>
9940
+ * Note that the {@code other} Iterable is evaluated as items are observed from the source Observable; it is
9941
+ * not pre-consumed. This allows you to zip infinite streams on either side.
9942
+ * <dl>
9943
+ * <dt><b>Scheduler:</b></dt>
9944
+ * <dd>{@code zip} does not operate by default on a particular {@link Scheduler}.</dd>
9945
+ * </dl>
9946
+ *
9947
+ * @param <T2>
9948
+ * the type of items in the {@code other} Iterable
9949
+ * @param <R>
9950
+ * the type of items emitted by the resulting Observable
9951
+ * @param other
9952
+ * the Iterable sequence
9953
+ * @param zipFunction
9954
+ * a function that combines the pairs of items from the Observable and the Iterable to generate
9955
+ * the items to be emitted by the resulting Observable
9956
+ * @return an Observable that pairs up values from the source Observable and the {@code other} Iterable
9957
+ * sequence and emits the results of {@code zipFunction} applied to these pairs
9958
+ * @see <a href="https://github.com/Netflix/RxJava/wiki/Combining-Observables#zip">RxJava wiki: zip</a>
9959
+ * @see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.linq.observable.zip.aspx">MSDN: Observable.Zip</a>
9960
+ */
9961
+ public final <T2, R> Observable<R> zipWith(Iterable<? extends T2> other, Func2<? super T, ? super T2, ? extends R> zipFunction) {
9962
+ return lift(new OperatorZipIterable<T, T2, R>(other, zipFunction));
9963
+ }
9931
9964
9932
9965
/**
9933
9966
* Returns an Observable that emits items that are the result of applying a specified function to pairs of
0 commit comments