Class Settings

    • Constructor Summary

      Constructors 
      Constructor Description
      Settings()
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      abstract boolean getBoolean​(java.lang.String key)
      Deprecated.
      Effective value as boolean.
      abstract java.util.Date getDate​(java.lang.String key)
      Deprecated.
      Effective value as Date, without time fields.
      abstract java.util.Date getDateTime​(java.lang.String key)
      Deprecated.
      Effective value as Date, with time fields.
      abstract java.lang.Double getDouble​(java.lang.String key)
      Deprecated.
      Effective value as Double.
      abstract java.lang.Float getFloat​(java.lang.String key)
      Deprecated.
      Effective value as Float.
      abstract int getInt​(java.lang.String key)
      Deprecated.
      Effective value as int.
      abstract java.util.List<java.lang.String> getKeysStartingWith​(java.lang.String prefix)
      Deprecated.
       
      abstract long getLong​(java.lang.String key)
      Deprecated.
      Effective value as long.
      abstract java.lang.String getString​(java.lang.String key)
      Deprecated.
      The effective value of the specified property.
      abstract java.lang.String[] getStringArray​(java.lang.String key)
      Deprecated.
      Value is split by comma and trimmed.
      abstract java.lang.String[] getStringArrayBySeparator​(java.lang.String key, java.lang.String separator)
      Deprecated.
      Value is split and trimmed.
      abstract java.lang.String[] getStringLines​(java.lang.String key)
      Deprecated.
      Value is split by carriage returns.
      abstract boolean hasKey​(java.lang.String key)
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Settings

        public Settings()
        Deprecated.
    • Method Detail

      • hasKey

        public abstract boolean hasKey​(java.lang.String key)
        Deprecated.
        Returns:
        true if the property has a non-default value, else false.
      • getString

        @CheckForNull
        public abstract java.lang.String getString​(java.lang.String key)
        Deprecated.
        The effective value of the specified property. Can return null if the property is not set and has no defined default value.

        If the property is encrypted with a secret key, then the returned value is decrypted.

        Throws:
        java.lang.IllegalStateException - if value is encrypted but fails to be decrypted.
      • getBoolean

        public abstract boolean getBoolean​(java.lang.String key)
        Deprecated.
        Effective value as boolean. It is false if getString(String) does not return "true", even if it's not a boolean representation.
        Returns:
        true if the effective value is "true", else false.
      • getInt

        public abstract int getInt​(java.lang.String key)
        Deprecated.
        Effective value as int.
        Returns:
        the value as int. If the property does not have value nor default value, then 0 is returned.
        Throws:
        java.lang.NumberFormatException - if value is not empty and is not a parsable integer
      • getLong

        public abstract long getLong​(java.lang.String key)
        Deprecated.
        Effective value as long.
        Returns:
        the value as long. If the property does not have value nor default value, then 0L is returned.
        Throws:
        java.lang.NumberFormatException - if value is not empty and is not a parsable long
      • getDate

        @CheckForNull
        public abstract java.util.Date getDate​(java.lang.String key)
        Deprecated.
        Effective value as Date, without time fields. Format is DateUtils.DATE_FORMAT.
        Returns:
        the value as a Date. If the property does not have value nor default value, then null is returned.
        Throws:
        java.lang.RuntimeException - if value is not empty and is not in accordance with DateUtils.DATE_FORMAT.
      • getDateTime

        @CheckForNull
        public abstract java.util.Date getDateTime​(java.lang.String key)
        Deprecated.
        Effective value as Date, with time fields. Format is DateUtils.DATETIME_FORMAT.
        Returns:
        the value as a Date. If the property does not have value nor default value, then null is returned.
        Throws:
        java.lang.RuntimeException - if value is not empty and is not in accordance with DateUtils.DATETIME_FORMAT.
      • getFloat

        @CheckForNull
        public abstract java.lang.Float getFloat​(java.lang.String key)
        Deprecated.
        Effective value as Float.
        Returns:
        the value as Float. If the property does not have value nor default value, then null is returned.
        Throws:
        java.lang.NumberFormatException - if value is not empty and is not a parsable number
      • getDouble

        @CheckForNull
        public abstract java.lang.Double getDouble​(java.lang.String key)
        Deprecated.
        Effective value as Double.
        Returns:
        the value as Double. If the property does not have value nor default value, then null is returned.
        Throws:
        java.lang.NumberFormatException - if value is not empty and is not a parsable number
      • getStringArray

        public abstract java.lang.String[] getStringArray​(java.lang.String key)
        Deprecated.
        Value is split by comma and trimmed. Never returns null.
        Examples :
        • "one,two,three " -> ["one", "two", "three"]
        • " one, two, three " -> ["one", "two", "three"]
        • "one, , three" -> ["one", "", "three"]
      • getStringLines

        public abstract java.lang.String[] getStringLines​(java.lang.String key)
        Deprecated.
        Value is split by carriage returns.
        Returns:
        non-null array of lines. The line termination characters are excluded.
        Since:
        3.2
      • getStringArrayBySeparator

        public abstract java.lang.String[] getStringArrayBySeparator​(java.lang.String key,
                                                                     java.lang.String separator)
        Deprecated.
        Value is split and trimmed.
      • getKeysStartingWith

        public abstract java.util.List<java.lang.String> getKeysStartingWith​(java.lang.String prefix)
        Deprecated.