Ref<T> |
Ref.apply(Consumer<? super T> consumer) |
Pass the value to the provided Consumer function.
|
<K> Ref<T> |
Ref.asyncCompute(K key,
Function<K,? extends T> function) |
Deprecated.
|
<V> Ref<T> |
Ref.bind(BiConsumer<? super T,V> binder,
BiConsumer<? super T,V> unbinder,
V bindee) |
Bind something (usually a callback / listener) to the reference,
providing for automatic attachment and removal on reference change, reset
or disposal.
|
Ref<T> |
Ref.clear() |
Disposes the value and clears initialization.
|
Ref<T> |
Ref.compute(Function<? super T,? extends T> function) |
Transform the value using the supplied function.
|
Ref<T> |
Ref.ifPresent(Consumer<? super T> consumer) |
Pass the value to the provided Consumer function if one
exists.
|
Ref<T> |
Ref.init(Supplier<? extends T> supplier) |
Initialize the reference, calling the supplier function if a value is
needed.
|
Ref<T> |
Ref.onChange(Consumer<Ref.ChangeEvent<T>> onChangeHandler) |
Provide a function to handle changes in the Ref value.
|
Ref<T> |
Ref.onDispose(Consumer<? super T> onDisposeHandler) |
Provide a function to run on the value whenever the value is being
disposed of, either because the Ref has been removed from the code, the
root is being stopped, or clear has been explicitly
called.
|
Ref<T> |
Ref.onReset(Consumer<? super T> onResetHandler) |
Provide a function to run on the value whenever the Ref is reset - eg.
|
Ref<T> |
Ref.set(T value) |
Set the value.
|
Ref<T> |
Ref.setAsync(Async<T> async) |
Set the value from completion of the provided Async .
|
Ref<T> |
Ref.unbind() |
|