asResult
fun <R : T, T> ObservableOptional<T>.asResult(defaultValue: ObservableOptional.Value<R>?): ObservableOptional<R>
Casts an ObservableOptional to an ObservableOptional its subtype R or returns defaultValue if no such casting is possible.
Return
An ObservableOptional containing the current Value of R if it exists or defaultValue
Parameters
defaultValue
The default Value of R to be returned if ObservableOptional is not a Value of R or null
.