|
40 | 40 | import rx.observables.GroupedObservable;
|
41 | 41 | import rx.operators.OperationAll;
|
42 | 42 | import rx.operators.OperationCache;
|
| 43 | +import rx.operators.OperationCombineLatest; |
43 | 44 | import rx.operators.OperationConcat;
|
44 | 45 | import rx.operators.OperationDefer;
|
45 | 46 | import rx.operators.OperationDematerialize;
|
@@ -2737,6 +2738,35 @@ public R call(T0 t0, T1 t1, T2 t2, T3 t3) {
|
2737 | 2738 | });
|
2738 | 2739 | }
|
2739 | 2740 |
|
| 2741 | + /** |
| 2742 | + * Combines the given observables, emitting an event containing an aggregation of the latest values of each of the source observables |
| 2743 | + * each time an event is received from one of the source observables, where the aggregation is defined by the given function. |
| 2744 | + * @param w0 |
| 2745 | + * The first source observable. |
| 2746 | + * @param w1 |
| 2747 | + * The second source observable. |
| 2748 | + * @param combineLatestFunction |
| 2749 | + * The aggregation function used to combine the source observable values. |
| 2750 | + * @return A function from an observer to a subscription. This can be used to create an observable from. |
| 2751 | + */ |
| 2752 | + public static <R, T0, T1> Observable<R> combineLatest(Observable<T0> w0, Observable<T1> w1, Func2<T0, T1, R> combineFunction) { |
| 2753 | + return create(OperationCombineLatest.combineLatest(w0, w1, combineFunction)); |
| 2754 | + } |
| 2755 | + |
| 2756 | + /** |
| 2757 | + * @see #combineLatest(Observable, Observable, Func2) |
| 2758 | + */ |
| 2759 | + public static <R, T0, T1, T2> Observable<R> combineLatest(Observable<T0> w0, Observable<T1> w1, Observable<T2> w2, Func3<T0, T1, T2, R> combineFunction) { |
| 2760 | + return create(OperationCombineLatest.combineLatest(w0, w1, w2, combineFunction)); |
| 2761 | + } |
| 2762 | + |
| 2763 | + /** |
| 2764 | + * @see #combineLatest(Observable, Observable, Func2) |
| 2765 | + */ |
| 2766 | + public static <R, T0, T1, T2, T3> Observable<R> combineLatest(Observable<T0> w0, Observable<T1> w1, Observable<T2> w2, Observable<T3> w3, Func4<T0, T1, T2, T3, R> combineFunction) { |
| 2767 | + return create(OperationCombineLatest.combineLatest(w0, w1, w2, w3, combineFunction)); |
| 2768 | + } |
| 2769 | + |
2740 | 2770 | /**
|
2741 | 2771 | * Filters an Observable by discarding any of its emissions that do not meet some test.
|
2742 | 2772 | * <p>
|
|
0 commit comments