Class AbstractSetting<T>
java.lang.Object
org.openstreetmap.josm.spi.preferences.AbstractSetting<T>
- Type Parameters:
T- The setting type
- All Implemented Interfaces:
Setting<T>
- Direct Known Subclasses:
ListListSetting,ListSetting,MapListSetting,StringSetting
Base abstract class of all settings, holding the setting value.
- Since:
- 12881 (moved from package
org.openstreetmap.josm.data.preferences)
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSetting(T value) Constructs a newAbstractSettingwith the given value -
Method Summary
Modifier and TypeMethodDescriptionbooleangetTime()Get the time for this setting.getValue()Returns the value of this setting.inthashCode()booleanisNew()Return if the setting has been marked as new.voidsetNew(boolean isNew) Mark setting as new.voidSet the time for this setting.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.openstreetmap.josm.spi.preferences.Setting
copy, equalVal, getNullInstance, visit
-
Field Details
-
value
-
time
-
isNew
-
-
Constructor Details
-
AbstractSetting
Constructs a newAbstractSettingwith the given value- Parameters:
value- The setting value
-
-
Method Details
-
getValue
Description copied from interface:SettingReturns the value of this setting. -
setTime
Description copied from interface:SettingSet the time for this setting. For default preferences. They are saved in a cache file. Keeping the time allows to discard very old default settings. -
getTime
Description copied from interface:SettingGet the time for this setting. -
setNew
Description copied from interface:SettingMark setting as new. For default preferences. A setting is marked as new, if it has been seen in the current session. Methods likeIPreferences.get(java.lang.String, java.lang.String), can be called from different parts of the code with the same key. In this case, the supplied default value must match. However, this is only an error if the mismatching default value has been seen in the same session (and not loaded from cache). -
isNew
Description copied from interface:SettingReturn if the setting has been marked as new. -
toString
-
hashCode
-
equals
-