public final class MutableProperty<V> extends java.lang.Object implements IMutableProperty<V>
Value that allows observation of its changes.
Inspired by [ReactiveCocoa 4](https://github.com/ReactiveCocoa/ReactiveCocoa)| Constructor and Description |
|---|
MutableProperty(V initialValue)
Initializes the property with
initialValue. |
| Modifier and Type | Method and Description |
|---|---|
static <V> rx.Subscription |
bind(IMutableProperty<V> destination,
IProperty<V> source) |
static <Value> rx.Subscription |
bind(IMutableProperty<Value> destination,
rx.Observable<Value> source) |
rx.Subscription |
bind(IProperty<V> source)
Binds to the latest values of
source to the receiver. |
rx.Subscription |
bind(rx.Observable<V> source)
Binds an
Observable to the receiver, updating the receiver's value to the latest
value sent by the observable.
The binding will automatically terminate when the receiver is finalized,
or when the observable completes. |
protected void |
finalize() |
rx.Observable<V> |
getObservable() |
V |
getValue() |
void |
setValue(V value)
Sets value of the receiver.
|
public MutableProperty(V initialValue)
initialValue.public V getValue()
public rx.Observable<V> getObservable()
getObservable in interface IProperty<V>public void setValue(V value)
IMutablePropertysetValue in interface IMutableProperty<V>public static <Value> rx.Subscription bind(IMutableProperty<Value> destination, rx.Observable<Value> source)
public static <V> rx.Subscription bind(IMutableProperty<V> destination, IProperty<V> source)
public rx.Subscription bind(rx.Observable<V> source)
IMutablePropertyObservable to the receiver, updating the receiver's value to the latest
value sent by the observable.
The binding will automatically terminate when the receiver is finalized,
or when the observable completes.bind in interface IMutableProperty<V>bind(IMutableProperty, Observable)public rx.Subscription bind(IProperty<V> source)
IMutablePropertysource to the receiver.
The binding will automatically terminate when either the receiver or source is finalized.bind in interface IMutableProperty<V>bind(IMutableProperty, IProperty)protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable