Class DefaultConfiguration

    • Field Summary

      • Fields inherited from class java.util.Properties

        defaults
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultConfiguration()
      Creates an empty property list with no default values.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Iterator findPropertyKeys​(java.lang.String prefix)
      Searches all property keys that start with a given prefix.
      java.util.Enumeration getConfigProperties()
      Returns an enumeration of the property keys.
      java.lang.String getConfigProperty​(java.lang.String key)
      Returns the configuration property with the specified key.
      java.lang.String getConfigProperty​(java.lang.String key, java.lang.String defaultValue)
      Returns the configuration property with the specified key (or the specified default value if there is no such property).
      void setConfigProperty​(java.lang.String key, java.lang.String value)
      Sets the value of a configuration property.
      • Methods inherited from class java.util.Properties

        clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, getProperty, getProperty, hashCode, isEmpty, keys, keySet, list, list, load, load, loadFromXML, merge, propertyNames, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, save, setProperty, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, toString, values
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DefaultConfiguration

        public DefaultConfiguration()
        Creates an empty property list with no default values.
    • Method Detail

      • getConfigProperty

        public java.lang.String getConfigProperty​(java.lang.String key)
        Returns the configuration property with the specified key.
        Specified by:
        getConfigProperty in interface Configuration
        Parameters:
        key - the property key.
        Returns:
        the property value.
      • getConfigProperty

        public java.lang.String getConfigProperty​(java.lang.String key,
                                                  java.lang.String defaultValue)
        Returns the configuration property with the specified key (or the specified default value if there is no such property).

        If the property is not defined in this configuration, the code will lookup the property in the parent configuration.

        Specified by:
        getConfigProperty in interface Configuration
        Parameters:
        key - the property key.
        defaultValue - the default value.
        Returns:
        the property value.
      • findPropertyKeys

        public java.util.Iterator findPropertyKeys​(java.lang.String prefix)
        Searches all property keys that start with a given prefix.
        Specified by:
        findPropertyKeys in interface Configuration
        Specified by:
        findPropertyKeys in interface ModifiableConfiguration
        Parameters:
        prefix - the prefix that all selected property keys should share
        Returns:
        the properties as iterator.
      • setConfigProperty

        public void setConfigProperty​(java.lang.String key,
                                      java.lang.String value)
        Sets the value of a configuration property.
        Specified by:
        setConfigProperty in interface ModifiableConfiguration
        Parameters:
        key - the property key.
        value - the property value.