Interface Configuration


public interface Configuration
Represents a set of configuration properties. Each configuration property is identified by a unique string.
Author:
cdivilly
  • Method Details

    • equals

      boolean equals(Object obj)
      Overrides:
      equals in class Object
    • get

      String get(String name)
      Get a property value
      Parameters:
      name - The name of the property
      Returns:
      The value or null if the property is not defined
    • get

      default String get(String name, String defaultValue)
      Get a property value
      Parameters:
      name - The name of the property
      defaultValue - a default value to return if the property is not defined
      Returns:
      The value if it exists, or the value of the defaultValue parameter if it does not exist.
    • getPassword

      String getPassword(String name)
      Retrieves an encrypted configuration property (typically passwords).
      Parameters:
      name - Name of the configuration property
      Returns:
      the decrypted value or null if the value is not defined.
    • hashCode

      int hashCode()
      Overrides:
      hashCode in class Object
    • propertyNames

      Iterable<String> propertyNames()
      Enumerates the name of each defined configuration property.
      Returns:
      Set of property names
    • isEmpty

      default boolean isEmpty()
      Check if the object has configuration settings.
      Returns:
      Whether the configuration object is empty or not.