Interface Configuration.Builder
- All Known Subinterfaces:
 EmbeddedStorageConfigurationBuilder
- All Known Implementing Classes:
 Configuration.Builder.Default,EmbeddedStorageConfigurationBuilder.Default
- Enclosing interface:
 - Configuration
 
public static interface Configuration.Builder
Builder for 
Configurations.
 
 Child-configurations can be built by either using child(String) builders,
 or with full-qualified keys, as described in Configuration.
- 
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classConfiguration.Builder.Default - 
Method Summary
Modifier and Type Method Description ConfigurationbuildConfiguration()Finishes the building and returns the resultingConfiguration.Configuration.Builderchild(String key)Creates a builder for a child configuration.default Configuration.Builderchild(String key, Consumer<Configuration.Builder> childBuilder)Creates a child configuration.default Configuration.Builderload(ConfigurationLoader loader, ConfigurationParser parser)Loads values and child-configurations from the specified source into this builder.default <S> Configuration.Buildermap(ConfigurationMapper<S> mapper, S source)Maps values and child-configurations from the specified source into this builder.Configuration.Builderset(String key, String value)Sets either a simple key-value pair (foo=bar) or an entry in a child-configuration (full.qualified.foo=bar).Configuration.BuildersetAll(XGettingCollection<KeyValue<String,String>> properties)Sets many entries at once.Configuration.BuildersetAll(KeyValue<String,String>... properties)Sets many entries at once.Configuration.BuildervalueMapperProvider(ConfigurationValueMapperProvider valueMapperProvider)Sets theConfigurationValueMapperProvider. 
- 
Method Details
- 
map
Maps values and child-configurations from the specified source into this builder. This can be used to get values from one or more external resources.- Parameters:
 mapper- the mapper for the sourcesource- the input source- Returns:
 - this builder
 - See Also:
 ConfigurationMapper
 - 
load
Loads values and child-configurations from the specified source into this builder. This can be used to get values from one or more external resources.- Parameters:
 loader- the loader to retrieve the inputparser- the parser to parse the input- Returns:
 - this builder
 - See Also:
 ConfigurationLoader,ConfigurationParser
 - 
valueMapperProvider
Sets theConfigurationValueMapperProvider. Use this method to insert user-defined value mappers.- Parameters:
 valueMapperProvider- the new mapper provider- Returns:
 - this builder
 
 - 
set
Sets either a simple key-value pair (foo=bar) or an entry in a child-configuration (full.qualified.foo=bar).- Parameters:
 key- simple or full-qualified key, cannot be empty ornullvalue- the value to set, cannot benull- Returns:
 - this builder
 
 - 
setAll
Sets many entries at once.- Parameters:
 properties- the key-value pairs- Returns:
 - this builder
 - See Also:
 set(String, String)
 - 
setAll
Sets many entries at once.- Parameters:
 properties- the key-value pairs- Returns:
 - this builder
 - See Also:
 set(String, String)
 - 
child
Creates a builder for a child configuration.- Parameters:
 key- the key for the child configuration- Returns:
 - a new builder
 - See Also:
 child(String, Consumer)
 - 
child
Creates a child configuration.- Parameters:
 key- the key for the child configurationchildBuilder- the builder consumer for method chaining- Returns:
 - this builder
 
 - 
buildConfiguration
Configuration buildConfiguration()Finishes the building and returns the resultingConfiguration.- Returns:
 - the 
Configurationwith all values and child-configurations from this builder 
 
 -