Construct an observable that gives None
until the Future
completes successfully, after
which the Option
contains the successful result.
Construct an observable that gives None
until the Future
completes successfully, after
which the Option
contains the successful result.
This method does not allow you to differentiate between a failure and a calculation that is still running. If you need to differentiate these, you can either use scala.concurrent.Future.recover or use ofTryOption instead.
Construct an observable that gives the result of scala.concurrent.Future.value at all times.
Construct an observable that gives the result of scala.concurrent.Future.value at all times.
Like the underlying method, it gives None
until the Future
completes, after which it
gives a Some
of the Try
that describes the calculation.
Construct an observable that gives the value of the future on success.
Construct an observable that gives the value of the future on success.
Until the future completes successfully, the value will be that of
defaultValue
. If there is an error, the value will persist as
defaultValue
.
If you want to change state in case of an error, I recommend you use
scala.concurrent.Future.recover to choose the values that will be
used in that case. The defaultValue
is provided because Future
has
no equivalent mechanism for this mandatory functionality, but recovery
is already a built-in feature.
(Since version 0.10.2) Use withDefault. Apply
will be either removed or repurposed in a future release.
An scalafx.beans.value.ObservableValue that pulls its value from a future.