DeferredObservableProperty
This interface is an asynchronous variation to the ObservableProperty. Used if the initial value is undefined. It doesn't provide a value if it hasn't been assigned yet, but you can block the thread until it is.
Types
Listener
Link copied to clipboard
Functions
addListener
Link copied to clipboard
abstract fun addListener(listener: DeferredObservableProperty.Listener<T>): CancellationToken
Content copied to clipboard
Add a ValueChangeListener for value change on this property.
await
Link copied to clipboard
Blocks the current thread to wait for a value if latestValue is
null
, otherwise returns latestValue immediately.nextValue
Link copied to clipboard
Blocks the current thread until latestValue is replaced by a new value.
removeListener
Link copied to clipboard
abstract fun removeListener(listener: DeferredObservableProperty.Listener<T>)
Content copied to clipboard
Remove a ValueChangeListener from listeners to value change on this property.
Properties
latestValue
Link copied to clipboard
Extensions
flatMapLatest
Link copied to clipboard
fun <T, U> DeferredObservableProperty<T>.flatMapLatest(equalityPolicy: ObservableProperty.EqualityPolicy<DeferredObservableProperty<U>> = identityEqualityPolicy(), transform: (T) -> DeferredObservableProperty<U>): DeferredObservableProperty<U>
Content copied to clipboard
A mapping function applied to each element collected from the ObsrvableProperty to return a DeferredObservableProperty.
map
Link copied to clipboard
fun <T, U> DeferredObservableProperty<T>.map(equalityPolicy: ObservableProperty.EqualityPolicy<U> = defaultEqualityPolicy(), transform: (T) -> U): DeferredObservableProperty<U>
Content copied to clipboard
A mapping function applied to each element collected from the DeferredObservableProperty.
startWith
Link copied to clipboard
fun <T> DeferredObservableProperty<T>.startWith(initialValue: T): ObservableProperty<T>
Content copied to clipboard
Conversion method to synchronous ObservableProperty.