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, wait
copy, equalVal, getNullInstance, visit
public AbstractSetting(T value)
AbstractSetting
with the given valuevalue
- The setting valuepublic T getValue()
Setting
public void setTime(java.lang.Long time)
Setting
public java.lang.Long getTime()
Setting
getTime
in interface Setting<T>
Setting.setTime(java.lang.Long)
public void setNew(boolean isNew)
Setting
IPreferences.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()
Setting
isNew
in interface Setting<T>
Setting.setNew(boolean)
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object