Additional top-level classes in compilation unit: InvalidationListenerWrapper, ChangeListenerWrapper.
ObservableValue.
Canonical observer of Val<T> is an invalidation observer
of type Consumer<? super T>, which accepts the _invalidated_ value.
This is different from InvalidationListener, which does not
accept the invalidated value.
| Modifier and Type | Method and Description |
|---|---|
| public default void | |
| public default void | addListener(InvalidationListener listener)
Implements javafx. Adds an |
| public default void | addListener(ChangeListener<? super T> listener)
Implements javafx. Adds a |
| public default Val | animate(BiFunction<? super T, ? super T, Duration>
function that calculates the desired duration of the
transition for two boundary values. duration, Interpolator<T> calculates the interpolated value between two
boundary values, given a fraction. interpolator)Returns a new Val that gradually transitions to the value of this Val every time this Val changes. |
| public default Val | |
| public static <T> Val | animate(ObservableValue<T>
observable value to animate obs, BiFunction<? super T, ? super T, Duration> function that calculates the desired duration of the
transition for two boundary values. duration, Interpolator<T> calculates the interpolated value between two
boundary values, given a fraction. interpolator)Creates a new Val that gradually transitions to the value
of the given ObservableValue |
| public static <T> Val | animate(ObservableValue<T>
observable value to animate obs, Duration the desired duration of the transition duration, Interpolator<T> calculates the interpolated value between two
boundary values, given a fraction. interpolator)Creates a new Val that gradually transitions to the value
of the given ObservableValue |
| public static <T extends Interpolatable | animate(ObservableValue<T> obs, BiFunction<? super T, ? super T, Duration> duration)
Like |
| public static <T extends Interpolatable | animate(ObservableValue<T> obs, Duration duration)
Like |
| public default LiveList | |
| public default Var | asVar(Consumer<T> setValue)
Let's this Val be viewed as a Var, with the
given |
| public default EventStream | changes()
Returns a stream of changed values, which emits the changed value (i.e. the old and the new value) on each change of this observable value. |
| public static <A, B, R> Val | combine(ObservableValue<A> src1, ObservableValue<B> src2, BiFunction<? super A, ? super B, ? extends R> f)
|
| public static <A, B, C, R> Val | combine(ObservableValue<A> src1, ObservableValue<B> src2, ObservableValue<C> src3, TriFunction<? super A, ? super B, ? super C, ? extends R> f)
|
| public static <A, B, C, D, R> Val | combine(ObservableValue<A> src1, ObservableValue<B> src2, ObservableValue<C> src3, ObservableValue<D> src4, TetraFunction<? super A, ? super B, ? super C, ? super D, ? extends R> f)
|
| public static <A, B, C, D, E, R> Val | combine(ObservableValue<A> src1, ObservableValue<B> src2, ObservableValue<C> src3, ObservableValue<D> src4, ObservableValue<E> src5, PentaFunction<? super A, ? super B, ? super C, ? super D, ? super E, ? extends R> f)
|
| public static <A, B, C, D, E, F, R> Val | combine(ObservableValue<A> src1, ObservableValue<B> src2, ObservableValue<C> src3, ObservableValue<D> src4, ObservableValue<E> src5, ObservableValue<F> src6, HexaFunction<? super A, ? super B, ? super C, ? super D, ? super E, ? super F, ? extends R> f)
|
| public default Val | conditionOn(ObservableValue<Boolean> condition)
Returns a new Val that only observes this Val
when |
| public static <T> Val | |
| public default Val | conditionOnShowing(Node node)
Equivalent to |
| public static <T> Val | |
| public static <T> Val | |
| public static <T> Val | |
| public static <T> Val | |
| public default Val | |
| public static <T> Val | |
| public default <U> Val | flatMap(Function<? super T, ? extends ObservableValue<U>> f)
Overrides default javafx. Returns a new Val that, when this Val holds
value |
| public static <T, U> Val | |
| public default Optional | |
| public default T | |
| public default T | getOrSupply(Supplier<? extends T>
computation to produce default value, if this
Val is empty. defaultSupplier)Like |
| public default T | |
| public default void | |
| public default EventStream | invalidations()
Returns a stream of invalidated values, which emits the invalidated value (i.e. the old value) on each invalidation of this observable value. |
| public default boolean | |
| public default boolean | |
| public default <U> Val | |
| public static <T, U> Val | |
| public default <U> Val | mapDynamic(ObservableValue<? extends Function<? super T, ? extends U>> f)
Like |
| public static <T, U> Val | |
| public default Subscription | observeChanges(ChangeListener<? super T> listener)
Adds a change listener and returns a Subscription that can be used to remove that listener. |
| public static <T> Subscription | |
| public default Subscription | |
| public static Subscription | |
| public default Val | orElse(ObservableValue<T> other)
Overrides default javafx. Returns a new Val that holds the value held by this
Val, or the value held by |
| public static <T> Val | |
| public default Val | orElseConst(T other)
Returns a new Val that holds the value held by this
Val, or |
| public static <T> Val | |
| public default Subscription | |
| public default void | |
| public default void | removeListener(InvalidationListener listener)
Implements javafx. Removes the given listener from the list of listeners, that are notified
whenever the value of the |
| public default void | removeListener(ChangeListener<? super T> listener)
Implements javafx. Removes the given listener from the list of listeners that are notified
whenever the value of the |
| public default <U> Var | selectVar(Function<? super T, ? extends Property<U>> f)
Similar to |
| public default <U> Var | |
| public static <T, U> Var | |
| public static <T, U> Var | |
| public static Val | showingProperty(Node node)
Returns a Val whose value is |
| public default SuspendableVal | |
| public static <T> SuspendableVal | |
| public default EventStream | |
| public static <T> Val |
| addInvalidationObserver | back to summary |
|---|---|
| public default void addInvalidationObserver(Consumer<? super T> observer) | |
| addListener | back to summary |
|---|---|
| public default void addListener(InvalidationListener listener) Implements javafx. Doc from javafx. Adds an
Note that the same actual
The
| |
| addListener | back to summary |
|---|---|
| public default void addListener(ChangeListener<? super T> listener) Implements javafx. Doc from javafx. Adds a
Note that the same actual
The
| |
| animate | back to summary |
|---|---|
| public default Val Returns a new Val that gradually transitions to the value of this Val every time this Val changes. When the returned Val has no observer, there is no
gradual transition taking place. This means that there is no animation
running in the background that would consume system resources. This also
means that in that case
| |
| animate | back to summary |
|---|---|
| public default Val Returns a new Val that gradually transitions to the value of this Val every time this Val changes. When the returned Val has no observer, there is no
gradual transition taking place. This means that there is no animation
running in the background that would consume system resources. This also
means that in that case
| |
| animate | back to summary |
|---|---|
| public static <T> Val Creates a new Val that gradually transitions to the value
of the given ObservableValue When the returned Val has no observer, there is no
gradual transition taking place. This means that there is no animation
running in the background that would consume system resources. This also
means that in that case
| |
| animate | back to summary |
|---|---|
| public static <T> Val Creates a new Val that gradually transitions to the value
of the given ObservableValue When the returned Val has no observer, there is no
gradual transition taking place. This means that there is no animation
running in the background that would consume system resources. This also
means that in that case
| |
| animate | back to summary |
|---|---|
| public static <T extends Interpolatable Like | |
| animate | back to summary |
|---|---|
| public static <T extends Interpolatable Like | |
| asList | back to summary |
|---|---|
| public default LiveList Returns a LiveList view of this Val. The
returned list will have size 1 when this Val is present
(i.e. not | |
| asVar | back to summary |
|---|---|
| public default Var Let's this Val be viewed as a Var, with the
given | |
| changes | back to summary |
|---|---|
| public default EventStream Returns a stream of changed values, which emits the changed value (i.e. the old and the new value) on each change of this observable value. | |
| combine | back to summary |
|---|---|
| public static <A, B, R> Val | |
| combine | back to summary |
|---|---|
| public static <A, B, C, R> Val | |
| combine | back to summary |
|---|---|
| public static <A, B, C, D, R> Val | |
| combine | back to summary |
|---|---|
| public static <A, B, C, D, E, R> Val | |
| combine | back to summary |
|---|---|
| public static <A, B, C, D, E, F, R> Val | |
| conditionOn | back to summary |
|---|---|
| public default Val Returns a new Val that only observes this Val
when | |
| conditionOn | back to summary |
|---|---|
| public static <T> Val | |
| conditionOnShowing | back to summary |
|---|---|
| public default Val Equivalent to | |
| conditionOnShowing | back to summary |
|---|---|
| public static <T> Val | |
| constant | back to summary |
|---|---|
| public static <T> Val Returns a constant Val that holds the given value. The value never changes and no notifications are ever produced. | |
| create | back to summary |
|---|---|
| public static <T> Val | |
| create | back to summary |
|---|---|
| public static <T> Val | |
| filter | back to summary |
|---|---|
| public default Val Returns a new Val that holds the same value as this Val when the value satisfies the predicate and is empty when this Val is empty or its value does not satisfy the given predicate. | |
| filter | back to summary |
|---|---|
| public static <T> Val | |
| flatMap | back to summary |
|---|---|
| public default <U> Val Overrides default javafx. Returns a new Val that, when this Val holds
value | |
| flatMap | back to summary |
|---|---|
| public static <T, U> Val | |
| getOpt | back to summary |
|---|---|
| public default Optional Returns an | |
| getOrElse | back to summary |
|---|---|
| public default T getOrElse(T defaultValue) Returns the value currently held by this Val. If this
Val is empty,
| |
| getOrSupply | back to summary |
|---|---|
| public default T getOrSupply(Supplier<? extends T> defaultSupplier) Like | |
| getOrThrow | back to summary |
|---|---|
| public default T getOrThrow() Returns the value currently held by this Val.
| |
| ifPresent | back to summary |
|---|---|
| public default void ifPresent(Consumer<? super T> f) Invokes the given function if this Val holds a (non-null) value. | |
| invalidations | back to summary |
|---|---|
| public default EventStream Returns a stream of invalidated values, which emits the invalidated value (i.e. the old value) on each invalidation of this observable value. | |
| isEmpty | back to summary |
|---|---|
| public default boolean isEmpty() Inverse of | |
| isPresent | back to summary |
|---|---|
| public default boolean isPresent() Checks whether this Val holds a (non-null) value.
| |
| map | back to summary |
|---|---|
| public default <U> Val Overrides default javafx. Returns a new Val that holds a mapping of the value held by this Val, and is empty when this Val is empty. | |
| map | back to summary |
|---|---|
| public static <T, U> Val | |
| mapDynamic | back to summary |
|---|---|
| public default <U> Val Like | |
| mapDynamic | back to summary |
|---|---|
| public static <T, U> Val | |
| observeChanges | back to summary |
|---|---|
| public default Subscription observeChanges(ChangeListener<? super T> listener) Adds a change listener and returns a Subscription that can be used to remove that listener. | |
| observeChanges | back to summary |
|---|---|
| public static <T> Subscription observeChanges(ObservableValue<? extends T> obs, ChangeListener<? super T> listener) | |
| observeInvalidations | back to summary |
|---|---|
| public default Subscription observeInvalidations(Consumer<? super T> oldValueObserver) | |
| observeInvalidations | back to summary |
|---|---|
| public static Subscription observeInvalidations(ObservableValue<?> obs, InvalidationListener listener) | |
| orElse | back to summary |
|---|---|
| public default Val Overrides default javafx. Returns a new Val that holds the value held by this
Val, or the value held by | |
| orElse | back to summary |
|---|---|
| public static <T> Val | |
| orElseConst | back to summary |
|---|---|
| public default Val Returns a new Val that holds the value held by this
Val, or | |
| orElseConst | back to summary |
|---|---|
| public static <T> Val | |
| pin | back to summary |
|---|---|
| public default Subscription pin() | |
| removeInvalidationObserver | back to summary |
|---|---|
| public default void removeInvalidationObserver(Consumer<? super T> observer) | |
| removeListener | back to summary |
|---|---|
| public default void removeListener(InvalidationListener listener) Implements javafx. Doc from javafx. Removes the given listener from the list of listeners, that are notified
whenever the value of the If the given listener has not been previously registered (i.e. it was never added) then this method call is a no-op. If it had been previously added then it will be removed. If it had been added more than once, then only the first occurrence will be removed.
| |
| removeListener | back to summary |
|---|---|
| public default void removeListener(ChangeListener<? super T> listener) Implements javafx. Doc from javafx. Removes the given listener from the list of listeners that are notified
whenever the value of the If the given listener has not been previously registered (i.e. it was never added) then this method call is a no-op. If it had been previously added then it will be removed. If it had been added more than once, then only the first occurrence will be removed.
| |
| selectVar | back to summary |
|---|---|
| public default <U> Var Similar to As the value of this Val changes, so does the selected Property. When the Var returned from this method is bound, as the selected Property changes, the previously selected Property is unbound and the newly selected Property is bound. Note that if the currently selected Property is | |
| selectVar | back to summary |
|---|---|
| public default <U> Var | |
| selectVar | back to summary |
|---|---|
| public static <T, U> Var | |
| selectVar | back to summary |
|---|---|
| public static <T, U> Var | |
| showingProperty | back to summary |
|---|---|
| public static Val Returns a Val whose value is | |
| suspendable | back to summary |
|---|---|
| public default SuspendableVal | |
| suspendable | back to summary |
|---|---|
| public static <T> SuspendableVal | |
| values | back to summary |
|---|---|
| public default EventStream Returns a stream of values of this Val. The returned stream emits the current value of this Val for each new subscriber and then the new value whenever the value changes. | |
| wrap | back to summary |
|---|---|
| public static <T> Val Returns a Val wrapper around ObservableValue.
If the argument is already a
one can write
However, an explicit wrapper is necessary if access to
observeInvalidations(Consumer), or invalidations()
is needed, since there is no direct static method equivalent for them.
| |