Class Configuration.Builder

  • Enclosing class:
    Configuration

    public static final class Configuration.Builder
    extends java.lang.Object
    Builder for Configuration instances.

    This class also provides static factory methods for easy creation of commonly used Configurations.

    • Constructor Summary

      Constructors 
      Constructor Description
      Builder()
      Constructor.
      Builder​(Configuration config)
      Constructor.
      Builder​(java.util.Map<java.lang.String,​java.lang.Object> properties)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Configuration build()  
      Configuration.Builder register​(java.lang.String propName, java.lang.Object value)
      Registers a setting for the configuration to be built.
      • Methods inherited from class java.lang.Object

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

      • Builder

        public Builder()
        Constructor.
      • Builder

        public Builder​(Configuration config)
        Constructor.

        Initializes the newly constructed instance with properties of the specified configuration.

        Parameters:
        config - configuration to provide initial properties for this instance; muse not be null
      • Builder

        public Builder​(java.util.Map<java.lang.String,​java.lang.Object> properties)
        Constructor.

        Initializes the newly constructed instance with the specified properties.

        Parameters:
        properties - initial configuration properties; must not be null
    • Method Detail

      • register

        public Configuration.Builder register​(java.lang.String propName,
                                              java.lang.Object value)
        Registers a setting for the configuration to be built.
        Parameters:
        propName - name of the setting
        value - value of the setting
        Returns:
        this