Package org.reactfx.value
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 Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description default void
bindBidirectional(javafx.beans.property.Property<T> other)
static Var<java.lang.Double>
doubleVar(javafx.beans.property.DoubleProperty p)
Converts DoubleProperty toVar<Double>
to help deal with the consequences of DoubleProperty not being a subtype ofProperty<Double>
.static Var<java.lang.Float>
floatVar(javafx.beans.property.FloatProperty p)
Converts FloatProperty toVar<Float>
to help deal with the consequences of FloatProperty not being a subtype ofProperty<Float>
.static <T> Var<T>
fromVal(javafx.beans.value.ObservableValue<T> obs, java.util.function.Consumer<T> setValue)
Creates a Var from ObservableValue, using the givensetValue
function in place of theWritableValue.setValue(Object)
method.default java.lang.Object
getBean()
default java.lang.String
getName()
static Var<java.lang.Integer>
integerVar(javafx.beans.property.IntegerProperty p)
Converts IntegerProperty toVar<Integer>
to help deal with the consequences of IntegerProperty not being a subtype ofProperty<Integer>
.static Var<java.lang.Long>
longVar(javafx.beans.property.LongProperty p)
Converts LongProperty toVar<Long>
to help deal with the consequences of LongProperty not being a subtype ofProperty<Long>
.default <U> Var<U>
mapBidirectional(java.util.function.Function<? super T,? extends U> f, java.util.function.Function<? super U,? extends T> g)
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)
static <T> Var<T>
newSimpleVar(T initialValue)
default SuspendableVar<T>
suspendable()
static <T> SuspendableVar<T>
suspendable(javafx.beans.property.Property<T> p)
default void
unbindBidirectional(javafx.beans.property.Property<T> other)
-
Methods inherited from interface org.reactfx.Observable
addObserver, observe, removeObserver
-
Methods inherited from interface org.reactfx.value.Val
addInvalidationObserver, addListener, addListener, animate, animate, asList, asVar, changes, conditionOn, conditionOnShowing, filter, flatMap, getOpt, getOrElse, getOrSupply, getOrThrow, ifPresent, invalidations, isEmpty, isPresent, map, mapDynamic, observeChanges, observeInvalidations, orElse, orElseConst, pin, removeInvalidationObserver, removeListener, removeListener, selectVar, selectVar, values
-
-
-
-
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 givensetValue
function in place of theWritableValue.setValue(Object)
method.- Parameters:
obs
- ObservableValue whose value can be changed by thesetValue
function.setValue
- function used to set the value ofobs
. When invoked with a valuex
, it should perform an action that may or may not result in a change ofobs
's value tox
.
-
doubleVar
static Var<java.lang.Double> doubleVar(javafx.beans.property.DoubleProperty p)
Converts DoubleProperty toVar<Double>
to help deal with the consequences of DoubleProperty not being a subtype ofProperty<Double>
.
-
floatVar
static Var<java.lang.Float> floatVar(javafx.beans.property.FloatProperty p)
Converts FloatProperty toVar<Float>
to help deal with the consequences of FloatProperty not being a subtype ofProperty<Float>
.
-
integerVar
static Var<java.lang.Integer> integerVar(javafx.beans.property.IntegerProperty p)
Converts IntegerProperty toVar<Integer>
to help deal with the consequences of IntegerProperty not being a subtype ofProperty<Integer>
.
-
longVar
static Var<java.lang.Long> longVar(javafx.beans.property.LongProperty p)
Converts LongProperty toVar<Long>
to help deal with the consequences of LongProperty not being a subtype ofProperty<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 interfacejavafx.beans.property.Property<T>
-
unbindBidirectional
default void unbindBidirectional(javafx.beans.property.Property<T> other)
- Specified by:
unbindBidirectional
in interfacejavafx.beans.property.Property<T>
-
getBean
default java.lang.Object getBean()
- Specified by:
getBean
in interfacejavafx.beans.property.ReadOnlyProperty<T>
-
getName
default java.lang.String getName()
- Specified by:
getName
in interfacejavafx.beans.property.ReadOnlyProperty<T>
-
suspendable
default SuspendableVar<T> suspendable()
- Specified by:
suspendable
in interfaceVal<T>
-
-