Package fmpp.setting

Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 a null 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