Class DefaultSettingsMap

java.lang.Object
org.apache.juneau.cp.DefaultSettingsMap

public class DefaultSettingsMap extends Object
A list of default settings.

Consists of a simple string-keyed map of arbitrary objects.

Notes:
  • This class is not thread safe.
See Also:
  • Constructor Details

  • Method Details

    • create

      public static DefaultSettingsMap create()
      Static creator.
      Returns:
      A new object.
    • set

      public DefaultSettingsMap set(String name, Object value)
      Sets the specified setting value.
      Parameters:
      name - The setting name.
      value - The setting value.
      Returns:
      This object.
    • get

      public <T> Optional<T> get(Class<T> type, String name)
      Returns the value of the specified setting if it exists.
      Type Parameters:
      T - The return type.
      Parameters:
      type - The setting type.
      name - The setting name.
      Returns:
      The setting value.
    • copy

      Creates a copy of this map.
      Returns:
      A copy of this map.