ReadWritePropertyDefaultSubject
A BaseDefaultSubject that matches its value to a ReadWriteProperty. When the ReadWriteProperty updates, changes to the property are not immediately delegated back to the subject. Use a Flow based subject if synchronized values are required
Parameters
the type of value to expect.
the type of result to expect. Must be a subclass of T
The default R to return if the value of the ReadWriteProperty is null
.
The ReadWriteProperty to track.
The initial value of T. Defaults to the current value of the ReadWriteProperty.
The CoroutineScope on which to emit changes to the ReadWriteProperty
The CoroutineContext in which to emit changes to the ReadWriteProperty
The ObservationInitialized to handle observation.
Constructors
Properties
The current value T or null
being observed
The default Value of R. Can be used in case Nothing is Initial.initialValue
The initial ObservableOptional value of T.
The Observer that observes the observable value.
A ReadOnlyProperty of T
Functions
Bind changes in value to a CoroutineScope in a CoroutineContext
Convenience method for BasicSubject that calls BasicSubject.bind using the CoroutineContext of the provided CoroutineScope
Creates an observation that calls onNext each time a new value is observed until the resulting Disposable is disposed
Observes WithState of a nullable value on the lifecycle of a LifecycleOwner
Observes WithState on the lifecycle of a LifecycleOwner
Observes WithState on the lifecycle of a LifecycleOwner by transforming the observed value.
Converts a ReadOnlyProperty into a ReadOnlyPropertyDefaultObservable
Converts a ReadOnlyProperty into a ReadOnlyPropertyInitializedObservable