combineLatest

fun <T, R, O> ObservableSet<T>.combineLatest(transformer: (T) -> Observable<R>, aggregator: (Iterable<R>) -> O): Observable<O>

Combines the content of an ObservableSet into a single observable by applying a mapping function to each element and aggregating the results. This function generates a single observable that emits every time the underlying set of contents is changed, or some of the values (which are in turn observables) emit a changes, triggering the re-evaluation of the aggregation function.

Return

An Observable emitting the aggregated result of the mapped content from the ObservableSet.

Parameters

transformer

A function that maps each element of the ObservableSet to an Observable.

aggregator

A function that aggregates the mapped results into a single value.