Package io.github.mmm.value.observable
Interface WritableObservableValue<V>
-
- Type Parameters:
V
- type of thevalue
.
- All Superinterfaces:
EventSource<ObservableEvent<V>,ObservableEventListener<? super V>>
,ObservableValue<V>
,ReadableValue<V>
,Supplier<V>
,WritableValue<V>
- All Known Subinterfaces:
WritableBeanProperty<V>
,WritableBigDecimalProperty
,WritableBigIntegerProperty
,WritableBooleanProperty
,WritableByteProperty
,io.github.mmm.property.container.collection.WritableCollectionProperty<V,E>
,WritableContainerProperty<V,E>
,WritableDoubleProperty
,WritableFloatProperty
,WritableInstantProperty
,WritableIntegerProperty
,WritableListProperty<E>
,WritableLocalDateProperty
,WritableLocalDateTimeProperty
,WritableLocalTimeProperty
,WritableLongProperty
,WritableMapProperty<K,V>
,WritableNumberProperty<N>
,WritableObjectProperty<V>
,WritableOffsetDateTimeProperty
,WritableOffsetTimeProperty
,WritableProperty<V>
,WritableRangeProperty<V>
,WritableSetProperty<E>
,WritableShortProperty
,WritableSimpleProperty<V>
,WritableStringProperty
,WritableZonedDateTimeProperty
- All Known Implementing Classes:
AbstractWritableObservableValue
,BeanProperty
,BigDecimalProperty
,BigIntegerProperty
,BooleanProperty
,ByteProperty
,io.github.mmm.property.container.collection.CollectionProperty
,ContainerProperty
,DoubleProperty
,DurationInSecondsProperty
,FloatProperty
,IdProperty
,InstantProperty
,IntegerProperty
,LinkProperty
,ListProperty
,LocalDateProperty
,LocalDateTimeProperty
,LocalTimeProperty
,LongProperty
,MapProperty
,NumberProperty
,ObjectProperty
,OffsetDateTimeProperty
,OffsetTimeProperty
,Property
,RangeProperty
,SetProperty
,ShortProperty
,SimpleProperty
,StringListProperty
,StringProperty
,TemporalProperty
,ZonedDateTimeProperty
public interface WritableObservableValue<V> extends ObservableValue<V>, WritableValue<V>
- Since:
- 1.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
bindOneWay(ObservableValue<? extends V> observable)
Creates a unidirection binding for this object.
ATTENTION:
An unidirectional binding is very strict.void
bindTwoWay(WritableObservableValue<V> other)
Create a bidirectional binding between this object and the given one.boolean
isBoundOneWay()
void
unbindOneWay()
Removes theunidirectional binding
from this object.void
unbindTwoWay(WritableObservableValue<V> other)
Removes abidirectional binding
between this object and the given one.-
Methods inherited from interface io.github.mmm.event.EventSource
addListener, addListener, addWeakListener, removeListener
-
Methods inherited from interface io.github.mmm.value.observable.ObservableValue
toString
-
Methods inherited from interface io.github.mmm.value.ReadableValue
get, getSafe
-
Methods inherited from interface io.github.mmm.value.WritableValue
set
-
-
-
-
Method Detail
-
bindOneWay
void bindOneWay(ObservableValue<? extends V> observable)
Creates a unidirection binding for this object.
ATTENTION:
An unidirectional binding is very strict. It makes this object to appear exactly as theObservableValue
it is bound to. After creating the unidirectional binding, calls toWritableValue.set(Object)
will fail. This is very different to anbidirectional binding
.- Parameters:
observable
- theObservableValue
this object should be bound to.- See Also:
unbindOneWay()
,isBoundOneWay()
-
unbindOneWay
void unbindOneWay()
Removes theunidirectional binding
from this object. If this object is notbound
, this method has no effect.- See Also:
bindOneWay(ObservableValue)
-
isBoundOneWay
boolean isBoundOneWay()
- Returns:
true
if this object isbound
,false
otherwise.- See Also:
bindOneWay(ObservableValue)
-
bindTwoWay
void bindTwoWay(WritableObservableValue<V> other)
Create a bidirectional binding between this object and the given one. After a bidirectional binding,WritableValue.set(Object)
on this object will propagate its value to the bound one and vice versa. Bidirectional bindings exists independently ofunidirectional bindings
. However, it is bad practice to combine both. It is possible to have multiple bidirectional bindings for the same object.- Parameters:
other
- the otherWritableObservableValue
to bind bidirectional.- See Also:
unbindTwoWay(WritableObservableValue)
-
unbindTwoWay
void unbindTwoWay(WritableObservableValue<V> other)
Removes abidirectional binding
between this object and the given one. If no bidirectional binding between these objects exists, this method has no effect. It is possible tounbind
in inverse order. So to unbind twobidirectional bound
objects it does not matter if you callunbindBidirectional
on the first with the second as argument or vice versa.- Parameters:
other
- the otherWritableObservableValue
to unbind bidirectional.- See Also:
bindTwoWay(WritableObservableValue)
-
-