Class AbstractToStringProperty.ChildProperty<T>
java.lang.Object
org.openstreetmap.josm.data.preferences.AbstractProperty<T>
org.openstreetmap.josm.data.preferences.AbstractToStringProperty<T>
org.openstreetmap.josm.data.preferences.AbstractToStringProperty.ChildProperty<T>
- Type Parameters:
T- The content type
- Enclosing class:
- AbstractToStringProperty<T>
This is a version of this property that attempts to get the property with a more specialized key and - if that fails - uses the property
value as default.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.openstreetmap.josm.data.preferences.AbstractToStringProperty
AbstractToStringProperty.ChildProperty<T>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 voidaddListenerImpl(PreferenceChangedListener adapter) cached()Creates a newCachingPropertyinstance for this property.protected TfromString(String string) Converts the string to an object of the given type.Replies the default value of this property.protected voidprotected voidStore the default value to the preferences.protected StringConverts the string to an object of the given type.Methods inherited from class org.openstreetmap.josm.data.preferences.AbstractToStringProperty
get, getAsString, getChildProperty, getSpecialized, putMethods inherited from class org.openstreetmap.josm.data.preferences.AbstractProperty
addListener, addWeakListener, equals, getKey, getPreferences, hashCode, isSet, remove, removeListener
-
Field Details
-
parent
-
-
Constructor Details
-
ChildProperty
ChildProperty(AbstractToStringProperty<T> parent, String key)
-
-
Method Details
-
storeDefaultValue
Description copied from class:AbstractPropertyStore the default value to the preferences.- Overrides:
storeDefaultValuein classAbstractProperty<T>
-
getDefaultValue
Description copied from class:AbstractPropertyReplies the default value of this property.- Overrides:
getDefaultValuein classAbstractProperty<T>- Returns:
- The default value of this property
-
fromString
Description copied from class:AbstractToStringPropertyConverts the string to an object of the given type.- Specified by:
fromStringin classAbstractToStringProperty<T>- Parameters:
string- The string- Returns:
- The object.
-
toString
Description copied from class:AbstractToStringPropertyConverts the string to an object of the given type.- Specified by:
toStringin classAbstractToStringProperty<T>- Parameters:
t- The object.- Returns:
- The string representing the object
-
addListenerImpl
- Overrides:
addListenerImplin classAbstractProperty<T>
-
removeListenerImpl
- Overrides:
removeListenerImplin classAbstractProperty<T>
-
cached
Description copied from class:AbstractPropertyCreates a newCachingPropertyinstance for this property.- Overrides:
cachedin classAbstractProperty<T>- Returns:
- The new caching property instance.
-