public class CachedDynamicLongProperty extends DynamicLongProperty
DynamicLongProperty 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 long |
primitiveValue |
defaultValue, prop| Constructor and Description |
|---|
CachedDynamicLongProperty(java.lang.String propName,
long defaultValue) |
| Modifier and Type | Method and Description |
|---|---|
protected long |
chooseValue()
Get the current value from the underlying DynamicProperty
|
long |
get()
Get the current cached value.
|
java.lang.Long |
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 CachedDynamicLongProperty(java.lang.String propName,
long defaultValue)
protected void propertyChanged()
PropertyWrapperpropertyChanged in class PropertyWrapper<java.lang.Long>protected long chooseValue()
public long get()
get in class DynamicLongPropertypublic java.lang.Long getValue()
PropertyWrappergetValue in interface Property<java.lang.Long>getValue in class DynamicLongProperty