Package org.brightify.hyperdrive.multiplatformx.property

Types

DeferredObservableProperty
Link copied to clipboard
interface DeferredObservableProperty<T>
This interface is an asynchronous variation to the ObservableProperty.
MutableObservableProperty
Link copied to clipboard
interface MutableObservableProperty<T> : ObservableProperty<T>
ObservableProperty with the added functionality of a mutable value.
ObservableProperty
Link copied to clipboard
interface ObservableProperty<T>
A synchronous property delegate accessor.
ViewModelProperty
Link copied to clipboard
typealias ViewModelProperty<T> = ObservableProperty<T>

Functions

asChannel
Link copied to clipboard
fun <T> ObservableProperty<T>.asChannel(): Channel<T>
Conversion method to Channel.
asFlow
Link copied to clipboard
fun <T> ObservableProperty<T>.asFlow(): Flow<T>
Conversion method to Flow.
combine
Link copied to clipboard
fun <T> combine(sources: List<ObservableProperty<T>>): ObservableProperty<List<T>>
Combine the last values of all provided ObservableProperty into a list of values.
fun <T1, T2> combine(source1: ObservableProperty<T1>, source2: ObservableProperty<T2>): ObservableProperty<Pair<T1, T2>>
Combine the last values of two ObservableProperty into a Pair.
fun <T1, T2, U> combine(source1: ObservableProperty<T1>, source2: ObservableProperty<T2>, combine: (T1, T2) -> U): ObservableProperty<U>
Combine the last values of two ObservableProperty with a mapping function.
fun <T1, T2, T3, U> combine(source1: ObservableProperty<T1>, source2: ObservableProperty<T2>, source3: ObservableProperty<T3>): ObservableProperty<Triple<T1, T2, T3>>
Combine the last values of three ObservableProperty into a Triple.
fun <T1, T2, T3, U> combine(source1: ObservableProperty<T1>, source2: ObservableProperty<T2>, source3: ObservableProperty<T3>, combine: (T1, T2, T3) -> U): ObservableProperty<U>
Combine the last values of three ObservableProperty with a mapping function.
fun <T1, T2, T3, T4, U> combine(source1: ObservableProperty<T1>, source2: ObservableProperty<T2>, source3: ObservableProperty<T3>, source4: ObservableProperty<T4>, combine: (T1, T2, T3, T4) -> U): ObservableProperty<U>
Combine the last values of four ObservableProperty with a mapping function.
fun <T1, T2, T3, T4, T5, U> combine(source1: ObservableProperty<T1>, source2: ObservableProperty<T2>, source3: ObservableProperty<T3>, source4: ObservableProperty<T4>, source5: ObservableProperty<T5>, combine: (T1, T2, T3, T4, T5) -> U): ObservableProperty<U>
Combine the last values of five ObservableProperty with a mapping function.
defaultEqualityPolicy
Link copied to clipboard
fun <T> defaultEqualityPolicy(): ObservableProperty.EqualityPolicy<T>
Create an equality policy using the default T.
deferred
Link copied to clipboard
fun <T> ObservableProperty<T>.deferred(): DeferredObservableProperty<T>
Conversion method to asynchronous DeferredObservableProperty.
filter
Link copied to clipboard
fun <T> ObservableProperty<T>.filter(equalityPolicy: ObservableProperty.EqualityPolicy<T> = defaultEqualityPolicy(), predicate: (T) -> Boolean): DeferredObservableProperty<T>
A filter function applied to each element collected from the ObservableProperty.
fun <T> ObservableProperty<T>.filter(initialValue: T, equalityPolicy: ObservableProperty.EqualityPolicy<T> = defaultEqualityPolicy(), predicate: (T) -> Boolean): ObservableProperty<T>
A filter function applied to each element collected from the ObservableProperty.
flatMapLatest
Link copied to clipboard
fun <T, U> ObservableProperty<T>.flatMapLatest(equalityPolicy: ObservableProperty.EqualityPolicy<ObservableProperty<U>> = identityEqualityPolicy(), transform: (T) -> ObservableProperty<U>): ObservableProperty<U>
A mapping function applied to each element collected from the ObservableProperty to return another ObservableProperty.
identityEqualityPolicy
Link copied to clipboard
fun <T> identityEqualityPolicy(): ObservableProperty.EqualityPolicy<T>
Create an equality policy that returns true only if the values are identical, not just equal.
map
Link copied to clipboard
fun <T, U> ObservableProperty<T>.map(equalityPolicy: ObservableProperty.EqualityPolicy<U> = defaultEqualityPolicy(), transform: (T) -> U): ObservableProperty<U>
A mapping function applied to each element collected from the ObservableProperty.
neverEqualPolicy
Link copied to clipboard
fun <T> neverEqualPolicy(): ObservableProperty.EqualityPolicy<T>
Create an equality policy that always returns false (values are never equal).
nextValue
Link copied to clipboard
suspend fun <T> ObservableProperty<T>.nextValue(): T
Block current thread in wait for the next value change.
startWith
Link copied to clipboard
fun <T> DeferredObservableProperty<T>.startWith(initialValue: T): ObservableProperty<T>
Conversion method to synchronous ObservableProperty.