ObservationDefault

constructor(defaultValue: R, initialValue: ObservableOptional.Value<T?>)

Constructor

Parameters

defaultValue

The default R to return if the current value is ObservableOptional.Nothing or ObservableOptional.Value containing null.

initialValue

The initial ObservableOptional.Value this observation should contain.


constructor(defaultValue: ObservableOptional.Value<R>, initialValue: ObservableOptional.Value<T?>)

Parameters

T

the type of value to expect.

R

the type of result to expect. Must be a subclass of T.

defaultValue

The default ObservableOptional.Value to return if the current value is ObservableOptional.Nothing or ObservableOptional.Value containing null.

initialValue

The initial ObservableOptional.Value this observation should contain.