类 Settings


  • public class Settings
    extends Object
    Global settings
    • 字段详细资料

      • DEFAULT

        public static final Settings DEFAULT
        Environment that contains currrent global settings
    • 方法详细资料

      • getTranslation

        public String getTranslation​(String code)
        Get the local name corresponding to a code
        参数:
        code - the code
        返回:
        the local name
      • getBooleanKeySet

        public Set<String> getBooleanKeySet()
        Get the keys of the boolean properties
        返回:
        the keys
      • getBoolean

        public Boolean getBoolean​(String key)
        Get the value of a boolean property
        参数:
        key - the key
        返回:
        the value
      • setBoolean

        public void setBoolean​(String key,
                               Boolean val)
        Set the value of a boolean property
        参数:
        key - the key
        val - the value
      • getIntegerKeySet

        public Set<String> getIntegerKeySet()
        Get the keys of the integer properties
        返回:
        the keys
      • getInteger

        public Integer getInteger​(String key)
        Get the value of a integer property
        参数:
        key - the key
        返回:
        the value
      • setInteger

        public void setInteger​(String key,
                               Integer val)
        Set the value of a integer property
        参数:
        key - the key
        val - the value
      • getDoubleKeySet

        public Set<String> getDoubleKeySet()
        Get the keys of the doubleing point properties
        返回:
        the keys
      • getDouble

        public Double getDouble​(String key)
        Get the value of a doubleing point property
        参数:
        key - the key
        返回:
        the value
      • setDouble

        public void setDouble​(String key,
                              Double val)
        Set the value of a doubleing point property
        参数:
        key - the key
        val - the value
      • getStringKeySet

        public Set<String> getStringKeySet()
        Get the keys of the string properties
        返回:
        the keys
      • getString

        public String getString​(String key)
        Get the value of a string property
        参数:
        key - the key
        返回:
        the value
      • setString

        public void setString​(String key,
                              String val)
        Set the value of a string property
        参数:
        key - the key
        val - the value
      • saveAsPreference

        public void saveAsPreference()
        Save settings as preference