|
41 | 41 | import rx.util.functions.FuncN;
|
42 | 42 | import rx.util.functions.Functions;
|
43 | 43 |
|
| 44 | +/** |
| 45 | + * Returns an Observable that combines the emissions of multiple source observables. Once each |
| 46 | + * source Observable has emitted at least one item, combineLatest emits an item whenever any of |
| 47 | + * the source Observables emits an item, by combining the latest emissions from each source |
| 48 | + * Observable with a specified function. |
| 49 | + * <p> |
| 50 | + * <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/combineLatest.png"> |
| 51 | + */ |
44 | 52 | public class OperationCombineLatest {
|
45 | 53 |
|
46 | 54 | /**
|
47 |
| - * Combines the two given observables, emitting an event containing an aggregation of the latest values of each of the source observables |
48 |
| - * each time an event is received from one of the source observables, where the aggregation is defined by the given function. |
49 |
| - * @param w0 The first source observable. |
50 |
| - * @param w1 The second source observable. |
51 |
| - * @param combineLatestFunction The aggregation function used to combine the source observable values. |
52 |
| - * @return A function from an observer to a subscription. This can be used to create an observable from. |
| 55 | + * Combines the two given Observables, emitting an item that aggregates the latest values of |
| 56 | + * each of the source Observables each time an item is received from either of the source |
| 57 | + * Observables, where the aggregation is defined by the given function. |
| 58 | + * @param w0 the first source Observable. |
| 59 | + * @param w1 the second source Observable. |
| 60 | + * @param combineLatestFunction the aggregation function that combines the source Observable |
| 61 | + * items. |
| 62 | + * @return a function from an Observer to a Subscription. This can be used to create an Observable. |
53 | 63 | */
|
54 | 64 | public static <T0, T1, R> Func1<Observer<R>, Subscription> combineLatest(Observable<T0> w0, Observable<T1> w1, Func2<T0, T1, R> combineLatestFunction) {
|
55 | 65 | Aggregator<R> a = new Aggregator<R>(Functions.fromFunc(combineLatestFunction));
|
|
0 commit comments