public interface Var<T> extends Val<T>, Property<T>
Modifier and Type | Method and Description |
---|---|
default void |
bindBidirectional(Property<T> other) |
static Var<Double> |
doubleVar(DoubleProperty p)
Converts DoubleProperty to
Var<Double> to help deal
with the consequences of DoubleProperty not being a subtype
of Property<Double> . |
static Var<Float> |
floatVar(FloatProperty p)
Converts FloatProperty to
Var<Float> to help deal
with the consequences of FloatProperty not being a subtype
of Property<Float> . |
static <T> Var<T> |
fromVal(ObservableValue<T> obs,
Consumer<T> setValue)
Creates a Var from ObservableValue, using the
given
setValue function in place of the WritableValue.setValue(Object)
method. |
default Object |
getBean() |
default String |
getName() |
static Var<Integer> |
integerVar(IntegerProperty p)
Converts IntegerProperty to
Var<Integer> to help
deal with the consequences of IntegerProperty not being a
subtype of Property<Integer> . |
static Var<Long> |
longVar(LongProperty p)
Converts LongProperty to
Var<Long> to help deal
with the consequences of LongProperty not being a subtype
of Property<Long> . |
default <U> Var<U> |
mapBidirectional(Function<? super T,? extends U> f,
Function<? super U,? extends T> g) |
static <T,U> Var<U> |
mapBidirectional(Property<T> src,
Function<? super T,? extends U> f,
Function<? super U,? extends T> g) |
static <T> Var<T> |
newSimpleVar(T initialValue) |
default SuspendableVar<T> |
suspendable() |
static <T> SuspendableVar<T> |
suspendable(Property<T> p) |
default void |
unbindBidirectional(Property<T> other) |
addInvalidationObserver, addListener, addListener, animate, animate, animate, animate, animate, animate, asList, asVar, changes, combine, combine, combine, combine, combine, conditionOn, conditionOn, conditionOnShowing, conditionOnShowing, constant, create, create, filter, filter, flatMap, flatMap, getOpt, getOrElse, getOrSupply, getOrThrow, ifPresent, invalidations, isEmpty, isPresent, map, map, mapDynamic, mapDynamic, observeChanges, observeChanges, observeInvalidations, observeInvalidations, orElse, orElse, orElseConst, orElseConst, pin, removeInvalidationObserver, removeListener, removeListener, selectVar, selectVar, selectVar, selectVar, showingProperty, suspendable, values, wrap
addObserver, observe, removeObserver
getValue
getValue, setValue
static <T> Var<T> newSimpleVar(T initialValue)
static <T> Var<T> fromVal(ObservableValue<T> obs, Consumer<T> setValue)
setValue
function in place of the WritableValue.setValue(Object)
method.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
.static Var<Double> doubleVar(DoubleProperty p)
Var<Double>
to help deal
with the consequences of DoubleProperty not being a subtype
of Property<Double>
.static Var<Float> floatVar(FloatProperty p)
Var<Float>
to help deal
with the consequences of FloatProperty not being a subtype
of Property<Float>
.static Var<Integer> integerVar(IntegerProperty p)
Var<Integer>
to help
deal with the consequences of IntegerProperty not being a
subtype of Property<Integer>
.static Var<Long> longVar(LongProperty p)
Var<Long>
to help deal
with the consequences of LongProperty not being a subtype
of Property<Long>
.static <T,U> Var<U> mapBidirectional(Property<T> src, Function<? super T,? extends U> f, Function<? super U,? extends T> g)
static <T> SuspendableVar<T> suspendable(Property<T> p)
default void bindBidirectional(Property<T> other)
bindBidirectional
in interface Property<T>
default void unbindBidirectional(Property<T> other)
unbindBidirectional
in interface Property<T>
default Object getBean()
getBean
in interface ReadOnlyProperty<T>
default String getName()
getName
in interface ReadOnlyProperty<T>
default SuspendableVar<T> suspendable()
suspendable
in interface Val<T>