ObservableSets

Functions

Link copied to clipboard
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.

Link copied to clipboard
fun <T, O> ObservableSet<T>.flatMap(transformer: (T) -> Observable<O>): Observable<Option<O>>

Transforms an ObservableSet of type T into a single Observable of type arrow.core.Option<O> by fusing the individual observables obtained from each item in the set.

Link copied to clipboard

Converts this ObservableSet of observables into a unique observable that emits when either this set would have changed (addition/removal of members) or one of its members emits a value.

@JvmName(name = "flattenMergeObservables")
fun <T> flattenMerge(observables: ObservableSet<out Observable<T>>): Observable<Option<T>>

Converts the given ObservableSet of observables into a unique observable that emits when either this set would have changed (addition/removal of members) or one of its members emits a value.

Link copied to clipboard
fun <T> observableSetOf(vararg items: T): ObservableSet<T>

Creates a new ObservableSet and populates it with the specified items.

Link copied to clipboard

Combines this observable set with another, producing a new observable set that represents the union of both sets.