T - The setting typepublic abstract class AbstractSetting<T> extends java.lang.Object implements Setting<T>
org.openstreetmap.josm.data.preferences)| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isNew |
protected java.lang.Long |
time |
protected T |
value |
| Constructor and Description |
|---|
AbstractSetting(T value)
Constructs a new
AbstractSetting with the given value |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.Long |
getTime()
Get the time for this setting.
|
T |
getValue()
Returns the value of this setting.
|
int |
hashCode() |
boolean |
isNew()
Return if the setting has been marked as new.
|
void |
setNew(boolean isNew)
Mark setting as new.
|
void |
setTime(java.lang.Long time)
Set the time for this setting.
|
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopy, equalVal, getNullInstance, visitpublic AbstractSetting(T value)
AbstractSetting with the given valuevalue - The setting valuepublic T getValue()
Settingpublic void setTime(java.lang.Long time)
Settingpublic java.lang.Long getTime()
SettinggetTime in interface Setting<T>Setting.setTime(java.lang.Long)public void setNew(boolean isNew)
SettingIPreferences.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).public boolean isNew()
SettingisNew in interface Setting<T>Setting.setNew(boolean)public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object