public class CachedDynamicDoubleProperty extends DynamicDoubleProperty
DynamicDoubleProperty that caches the primitive value whenever it is changed.
This can give improved performance due to avoiding the unboxing, at the expense of additional
memory usage.| Modifier and Type | Field and Description |
|---|---|
protected double |
primitiveValue |
defaultValue, prop| Constructor and Description |
|---|
CachedDynamicDoubleProperty(java.lang.String propName,
double defaultValue) |
| Modifier and Type | Method and Description |
|---|---|
protected double |
chooseValue()
Get the current value from the underlying DynamicProperty
|
double |
get()
Get the current cached value.
|
java.lang.Double |
getValue()
Get current typed value of the property.
|
protected void |
propertyChanged()
Called when the property value is updated.
|
addCallback, addValidator, getChangedTimestamp, getDefaultValue, getDynamicProperty, getName, propertyChanged, registerSubClassWithNoCallback, removeAllCallbacks, toString, validatepublic CachedDynamicDoubleProperty(java.lang.String propName,
double defaultValue)
protected void propertyChanged()
PropertyWrapperpropertyChanged in class PropertyWrapper<java.lang.Double>protected double chooseValue()
public double get()
get in class DynamicDoublePropertypublic java.lang.Double getValue()
PropertyWrappergetValue in interface Property<java.lang.Double>getValue in class DynamicDoubleProperty