org.openstreetmap.josm.data.preferences
Class IntegerProperty
java.lang.Object
org.openstreetmap.josm.data.preferences.AbstractProperty<java.lang.Integer>
org.openstreetmap.josm.data.preferences.IntegerProperty
public class IntegerProperty
- extends AbstractProperty<java.lang.Integer>
A property containing an Integer
value.
Constructor Summary |
IntegerProperty(java.lang.String key,
int defaultValue)
Constructs a new IntegerProperty . |
Method Summary |
java.lang.Integer |
get()
Replies the value of this property. |
boolean |
parseAndPut(java.lang.String value)
parses and saves an integer value |
boolean |
put(java.lang.Integer value)
Sets this property to the specified value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IntegerProperty
public IntegerProperty(java.lang.String key,
int defaultValue)
- Constructs a new
IntegerProperty
.
- Parameters:
key
- The property keydefaultValue
- The default value
get
public java.lang.Integer get()
- Description copied from class:
AbstractProperty
- Replies the value of this property.
- Specified by:
get
in class AbstractProperty<java.lang.Integer>
- Returns:
- the value of this property
put
public boolean put(java.lang.Integer value)
- Description copied from class:
AbstractProperty
- Sets this property to the specified value.
- Specified by:
put
in class AbstractProperty<java.lang.Integer>
- Parameters:
value
- The new value of this property
- Returns:
- true if something has changed (i.e. value is different than before)
parseAndPut
public boolean parseAndPut(java.lang.String value)
- parses and saves an integer value
- Parameters:
value
- the value to be parsed
- Returns:
- true - preference value has changed
false - parsing failed or preference value has not changed
JOSM