Interface Var<T>

  • All Superinterfaces:
    javafx.beans.Observable, Observable<java.util.function.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 Detail

      • newSimpleVar

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

        static <T> Var<T> fromVal​(javafx.beans.value.ObservableValue<T> obs,
                                  java.util.function.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<java.lang.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<java.lang.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<java.lang.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<java.lang.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,
                                                   java.util.function.Function<? super T,​? extends U> f,
                                                   java.util.function.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 java.lang.Object getBean()
        Specified by:
        getBean in interface javafx.beans.property.ReadOnlyProperty<T>
      • getName

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

        default <U> Var<U> mapBidirectional​(java.util.function.Function<? super T,​? extends U> f,
                                            java.util.function.Function<? super U,​? extends T> g)