T
- The type of object accessed by this propertypublic abstract class AbstractProperty<T> extends Object
Modifier and Type | Field and Description |
---|---|
protected T |
defaultValue |
protected String |
key |
Constructor and Description |
---|
AbstractProperty(String key,
T defaultValue)
Constructs a new
AbstractProperty . |
Modifier and Type | Method and Description |
---|---|
abstract T |
get()
Replies the value of this property.
|
T |
getDefaultValue()
Replies the default value of this property.
|
String |
getKey()
Replies the property key.
|
boolean |
isSet()
Determines if this property is currently set in JOSM preferences.
|
abstract boolean |
put(T value)
Sets this property to the specified value.
|
void |
remove()
Removes this property from JOSM preferences (i.e replace it by its default value).
|
protected final T defaultValue
public AbstractProperty(String key, T defaultValue)
AbstractProperty
.key
- The property keydefaultValue
- The default valuepublic boolean isSet()
Main.pref
contains this property.public T getDefaultValue()
public void remove()
public abstract T get()