public class ObservableFoldKt
Modifier and Type | Method and Description |
---|---|
static <T,R> R |
fold(rx.Observable<T> $receiver,
R accumulator,
kotlin.jvm.functions.Function2<? super R,? super T,kotlin.Unit> folderFun)
fold takes an rx.Observable stream and applies fold function on it, and collects all elements using the accumulator.
|
static <A,B> javafx.beans.value.ObservableValue<B> |
foldToObservableValue(rx.Observable<A> $receiver,
B initial,
kotlin.jvm.functions.Function2<? super A,? super B,? extends B> folderFun)
foldToObservableValue takes an rx.Observable stream and creates an ObservableValue out of it.
|
static <A,K> javafx.collections.ObservableMap<K,A> |
recordAsAssociation(rx.Observable<A> $receiver,
kotlin.jvm.functions.Function1<? super A,? extends K> toKey,
kotlin.jvm.functions.Function3<? super K,? super A,? super A,? extends A> merge)
This variant simply associates each event with its key.
|
static <A> javafx.collections.ObservableList<A> |
recordInSequence(rx.Observable<A> $receiver)
recordInSequence records incoming events on the rx.Observable in sequence.
|
public static <A,B> javafx.beans.value.ObservableValue<B> foldToObservableValue(rx.Observable<A> $receiver, B initial, kotlin.jvm.functions.Function2<? super A,? super B,? extends B> folderFun)
foldToObservableValue takes an rx.Observable stream and creates an ObservableValue out of it.
initial
- The initial value of the returned observable.folderFun
- The transformation function to be called on the observable value when a new element is emitted on
the stream.public static <T,R> R fold(rx.Observable<T> $receiver, R accumulator, kotlin.jvm.functions.Function2<? super R,? super T,kotlin.Unit> folderFun)
fold takes an rx.Observable stream and applies fold function on it, and collects all elements using the accumulator.
accumulator
- The accumulator for accumulating elements.folderFun
- The transformation function to be called on the observable list when a new element is emitted on
the stream, which should modify the list as needed.public static <A> javafx.collections.ObservableList<A> recordInSequence(rx.Observable<A> $receiver)
recordInSequence records incoming events on the rx.Observable in sequence.
public static <A,K> javafx.collections.ObservableMap<K,A> recordAsAssociation(rx.Observable<A> $receiver, kotlin.jvm.functions.Function1<? super A,? extends K> toKey, kotlin.jvm.functions.Function3<? super K,? super A,? super A,? extends A> merge)
This variant simply associates each event with its key.
toKey
- Function retrieving the key to associate with.merge
- The function to be called if there is an existing element at the key.