Package fmpp.setting
Class Settings.SettingType
- java.lang.Object
-
- fmpp.setting.Settings.SettingType
-
- Enclosing class:
- Settings
protected abstract static class Settings.SettingType extends java.lang.Object
Represents the type of the value of a setting.- Since:
- 0.9.16 (before that it was private)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description protected abstract java.lang.Object
convert(Settings settings, java.lang.Object value)
Converts an object to the type of the setting.protected abstract java.lang.Object
merge(Settings settings, java.lang.Object defValue, java.lang.Object value)
Merges two setting values.protected abstract java.lang.Object
parse(Settings settings, java.lang.String value, boolean forceStr)
Converts a string value to the type of the setting.
-
-
-
Method Detail
-
convert
protected abstract java.lang.Object convert(Settings settings, java.lang.Object value) throws SettingException
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 java.lang.Object parse(Settings settings, java.lang.String value, boolean forceStr) throws SettingException
Converts a string value to the type of the setting.- Throws:
SettingException
-
merge
protected abstract java.lang.Object merge(Settings settings, java.lang.Object defValue, java.lang.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
-
-