Class CachedProperty<T>
java.lang.Object
org.openstreetmap.josm.data.preferences.AbstractProperty<T>
org.openstreetmap.josm.data.preferences.CachedProperty<T>
- Type Parameters:
T- The value type of this property
- All Implemented Interfaces:
PreferenceChangedListener
public abstract class CachedProperty<T>
extends AbstractProperty<T>
implements PreferenceChangedListener
This is an old-style cached preference value.
You can replace this using the
AbstractProperty.cached(), AbstractProperty.cached() accessors-
Nested Class Summary
Nested classes/interfaces inherited from class org.openstreetmap.josm.data.preferences.AbstractProperty
AbstractProperty.InvalidPreferenceValueException, AbstractProperty.ValueChangeEvent<T>, AbstractProperty.ValueChangeListener<T> -
Field Summary
FieldsFields inherited from class org.openstreetmap.josm.data.preferences.AbstractProperty
defaultValue, key, preferences -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract TfromString(String s) get()Replies the value of this property.Replies the default value of this property.intvoidTriggered when a preference entry value changes.voidfinal booleanSets this property to the specified value.protected final voidMethods inherited from class org.openstreetmap.josm.data.preferences.AbstractProperty
addListener, addListenerImpl, addWeakListener, cached, equals, getKey, getPreferences, hashCode, isSet, remove, removeListener, removeListenerImpl, storeDefaultValue
-
Field Details
-
defaultValueAsString
-
value
-
updateCount
-
-
Constructor Details
-
CachedProperty
-
-
Method Details
-
updateValue
-
fromString
-
get
Description copied from class:AbstractPropertyReplies the value of this property.- Specified by:
getin classAbstractProperty<T>- Returns:
- the value of this property
-
put
-
put
Description copied from class:AbstractPropertySets this property to the specified value.- Specified by:
putin classAbstractProperty<T>- Parameters:
value- The new value of this property- Returns:
- true if something has changed (i.e. value is different than before)
-
getUpdateCount
-
getDefaultValue
Description copied from class:AbstractPropertyReplies the default value of this property.- Overrides:
getDefaultValuein classAbstractProperty<T>- Returns:
- The default value of this property
-
getDefaultValueAsString
-
getAsString
-
preferenceChanged
Description copied from interface:PreferenceChangedListenerTriggered when a preference entry value changes.- Specified by:
preferenceChangedin interfacePreferenceChangedListener- Parameters:
e- the preference change event
-