Package fmpp.setting
Class Settings.SettingType
java.lang.Object
fmpp.setting.Settings.SettingType
- Enclosing class:
Settings
Represents the type of the value of a setting.
- Since:
- 0.9.16 (before that it was private)
-
Method Details
-
convert
Converts an object to the type of the setting. Shouldn't accept anull
value. Must not modify the value object! Must accept values that were earlier returned by this method.- Throws:
SettingException
-
parse
protected abstract Object parse(Settings settings, String value, boolean forceStr) throws SettingException Converts a string value to the type of the setting.- Throws:
SettingException
-
merge
protected abstract Object merge(Settings settings, Object defValue, Object value) throws SettingException Merges two setting values. Shouldn't accept anull
value. Must not modify the value objects; create new object for the merged value. Both value parameter holds already converted (viaconvert(Settings, Object)
orparse(Settings, String, boolean)
) values.- Throws:
SettingException
-