|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openstreetmap.josm.data.preferences.AbstractProperty<T>
T - The type of object accessed by this propertypublic abstract class AbstractProperty<T>
Captures the common functionality of preference properties
| Field Summary | |
|---|---|
protected T |
defaultValue
|
protected java.lang.String |
key
|
| Constructor Summary | |
|---|---|
AbstractProperty(java.lang.String key,
T defaultValue)
Constructs a new AbstractProperty. |
|
| Method Summary | |
|---|---|
abstract T |
get()
Replies the value of this property. |
T |
getDefaultValue()
Replies the default value of this property. |
java.lang.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). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final java.lang.String key
protected final T defaultValue
| Constructor Detail |
|---|
public AbstractProperty(java.lang.String key,
T defaultValue)
AbstractProperty.
key - The property keydefaultValue - The default value| Method Detail |
|---|
public java.lang.String getKey()
public boolean isSet()
Main.pref contains this property.public T getDefaultValue()
public void remove()
public abstract T get()
public abstract boolean put(T value)
value - The new value of this property
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||