Class StringSetting
- java.lang.Object
-
- org.openstreetmap.josm.spi.preferences.AbstractSetting<java.lang.String>
-
- org.openstreetmap.josm.spi.preferences.StringSetting
-
- All Implemented Interfaces:
Setting<java.lang.String>
public class StringSetting extends AbstractSetting<java.lang.String>
Setting containing aString
value.- Since:
- 12881 (moved from package
org.openstreetmap.josm.data.preferences
)
-
-
Field Summary
-
Fields inherited from class org.openstreetmap.josm.spi.preferences.AbstractSetting
isNew, time, value
-
-
Constructor Summary
Constructors Constructor Description StringSetting(java.lang.String value)
Constructs a newStringSetting
with the given value
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringSetting
copy()
Clone the current object.StringSetting
getNullInstance()
Returns a setting whose value is null.void
visit(SettingVisitor visitor)
Enable usage of the visitor pattern.-
Methods inherited from class org.openstreetmap.josm.spi.preferences.AbstractSetting
equals, getTime, getValue, hashCode, isNew, setNew, setTime, toString
-
-
-
-
Constructor Detail
-
StringSetting
public StringSetting(java.lang.String value)
Constructs a newStringSetting
with the given value- Parameters:
value
- The setting value
-
-
Method Detail
-
copy
public StringSetting copy()
Description copied from interface:Setting
Clone the current object.- Returns:
- an identical copy of the current object
-
visit
public void visit(SettingVisitor visitor)
Description copied from interface:Setting
Enable usage of the visitor pattern.- Parameters:
visitor
- the visitor
-
getNullInstance
public StringSetting getNullInstance()
Description copied from interface:Setting
Returns a setting whose value is null. Cannot be static, because there is no static inheritance.- Returns:
- a Setting object that isn't null itself, but returns null
for
Setting.getValue()
-
-