public abstract class AbstractResetableProperty<T> extends Object implements ResetableProperty<T>
| Type | Property and Description |
|---|---|
BooleanBinding |
dirty
A property that tracks if the current value differs form the base value.
|
protected abstract Property<T> |
writableBaseValue |
baseValue, value| Modifier and Type | Field and Description |
|---|---|
protected BooleanBinding |
dirty |
| Constructor and Description |
|---|
AbstractResetableProperty()
The constructor of
AbstractResetableProperty |
AbstractResetableProperty(Object bean,
String name)
The constructor of
AbstractResetableProperty |
AbstractResetableProperty(Object bean,
String name,
T baseValue)
The constructor of
AbstractResetableProperty |
AbstractResetableProperty(T baseValue)
The constructor of
AbstractResetableProperty |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkValuesAreNotEqual() |
protected BooleanBinding |
createDirtyBinding() |
BooleanBinding |
dirtyProperty()
A property that tracks if the current value differs form the base value.
|
T |
getBaseValue()
Returns the base value of this
ResetableProperty. |
Object |
getBean()
Returns the
Object that contains this property. |
String |
getName()
Returns the name of this property.
|
T |
getValue()
Returns the current value of this
ResetableProperty. |
boolean |
isDirty()
Query if the current value differs from the base value.
|
ResetableProperty<T> |
rebase()
Sets the current value as the base value.
|
ResetableProperty<T> |
reset()
Sets the base value as the current value.
|
ResetableProperty<T> |
setValue(T value)
Sets the current value.
|
protected abstract Property<T> |
writableBaseValueProperty() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbaseValueProperty, valuePropertypublic BooleanBinding dirtyProperty
dirtyProperty in interface ResetableProperty<T>protected final BooleanBinding dirty
public AbstractResetableProperty()
AbstractResetablePropertypublic AbstractResetableProperty(@Nullable T baseValue)
AbstractResetablePropertybaseValue - the base value of this AbstractResetablePropertypublic AbstractResetableProperty(@Nullable Object bean, @Nonnull String name)
AbstractResetablePropertybean - the bean of this AbstractResetablePropertyname - the name of this AbstractResetablePropertypublic AbstractResetableProperty(@Nullable Object bean, @Nonnull String name, @Nullable T baseValue)
AbstractResetablePropertybean - the bean of this AbstractResetablePropertyname - the name of this AbstractResetablePropertybaseValue - the base value of this AbstractResetablePropertyprotected BooleanBinding createDirtyBinding()
protected boolean checkValuesAreNotEqual()
public BooleanBinding dirtyProperty()
ResetablePropertydirtyProperty in interface ResetableProperty<T>@Nullable public T getBaseValue()
ResetablePropertyResetableProperty.getBaseValue in interface ResetableProperty<T>@Nullable public T getValue()
ResetablePropertyResetableProperty.getValue in interface ResetableProperty<T>public ResetableProperty<T> setValue(@Nullable T value)
ResetablePropertysetValue in interface ResetableProperty<T>value - the new valuepublic boolean isDirty()
ResetablePropertyisDirty in interface ResetableProperty<T>true if values differ, false otherwisepublic ResetableProperty<T> rebase()
ResetablePropertyrebase in interface ResetableProperty<T>ResetablePropertypublic ResetableProperty<T> reset()
ResetablePropertyreset in interface ResetableProperty<T>ResetableProperty@Nullable public Object getBean()
ResetablePropertyObject that contains this property. If this property
is not contained in an Object, null is returned.getBean in interface ResetableProperty<T>Object or nullpublic String getName()
ResetablePropertyString.getName in interface ResetableProperty<T>String