Interface Var<T>

All Superinterfaces:
javafx.beans.Observable, Observable<Consumer<? super T>>, javafx.beans.value.ObservableValue<T>, javafx.beans.property.Property<T>, javafx.beans.property.ReadOnlyProperty<T>, Val<T>, javafx.beans.value.WritableValue<T>
All Known Subinterfaces:
SuspendableVar<T>
All Known Implementing Classes:
FlatMappedVar, SimpleVar, SuspendableVarWrapper, VarFromVal, VarWrapper

public interface Var<T> extends Val<T>, javafx.beans.property.Property<T>
  • Method Details

    • newSimpleVar

      static <T> Var<T> newSimpleVar(T initialValue)
    • fromVal

      static <T> Var<T> fromVal(javafx.beans.value.ObservableValue<T> obs, Consumer<T> setValue)
      Creates a Var from ObservableValue, using the given setValue function in place of the WritableValue.setValue(Object) method.
      Parameters:
      obs - ObservableValue whose value can be changed by the setValue function.
      setValue - function used to set the value of obs. When invoked with a value x, it should perform an action that may or may not result in a change of obs's value to x.
    • doubleVar

      static Var<Double> doubleVar(javafx.beans.property.DoubleProperty p)
      Converts DoubleProperty to Var<Double> to help deal with the consequences of DoubleProperty not being a subtype of Property<Double>.
    • floatVar

      static Var<Float> floatVar(javafx.beans.property.FloatProperty p)
      Converts FloatProperty to Var<Float> to help deal with the consequences of FloatProperty not being a subtype of Property<Float>.
    • integerVar

      static Var<Integer> integerVar(javafx.beans.property.IntegerProperty p)
      Converts IntegerProperty to Var<Integer> to help deal with the consequences of IntegerProperty not being a subtype of Property<Integer>.
    • longVar

      static Var<Long> longVar(javafx.beans.property.LongProperty p)
      Converts LongProperty to Var<Long> to help deal with the consequences of LongProperty not being a subtype of Property<Long>.
    • mapBidirectional

      static <T, U> Var<U> mapBidirectional(javafx.beans.property.Property<T> src, Function<? super T,? extends U> f, Function<? super U,? extends T> g)
    • suspendable

      static <T> SuspendableVar<T> suspendable(javafx.beans.property.Property<T> p)
    • bindBidirectional

      default void bindBidirectional(javafx.beans.property.Property<T> other)
      Specified by:
      bindBidirectional in interface javafx.beans.property.Property<T>
    • unbindBidirectional

      default void unbindBidirectional(javafx.beans.property.Property<T> other)
      Specified by:
      unbindBidirectional in interface javafx.beans.property.Property<T>
    • getBean

      default Object getBean()
      Specified by:
      getBean in interface javafx.beans.property.ReadOnlyProperty<T>
    • getName

      default String getName()
      Specified by:
      getName in interface javafx.beans.property.ReadOnlyProperty<T>
    • suspendable

      default SuspendableVar<T> suspendable()
      Specified by:
      suspendable in interface Val<T>
    • mapBidirectional

      default <U> Var<U> mapBidirectional(Function<? super T,? extends U> f, Function<? super U,? extends T> g)