public static interface Configuration.Builder
Configurations.
Child-configurations can be built by either using child(String) builders,
or with full-qualified keys, as described in Configuration.
| Modifier and Type | Interface and Description |
|---|---|
static class |
Configuration.Builder.Default |
| Modifier and Type | Method and Description |
|---|---|
Configuration |
buildConfiguration()
Finishes the building and returns the resulting
Configuration. |
Configuration.Builder |
child(String key)
Creates a builder for a child configuration.
|
default Configuration.Builder |
child(String key,
Consumer<Configuration.Builder> childBuilder)
Creates a child configuration.
|
default Configuration.Builder |
load(ConfigurationLoader loader,
ConfigurationParser parser)
Loads values and child-configurations from the specified source into this builder.
|
default <S> Configuration.Builder |
map(ConfigurationMapper<S> mapper,
S source)
Maps values and child-configurations from the specified source into this builder.
|
Configuration.Builder |
set(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.Builder |
setAll(KeyValue<String,String>... properties)
Sets many entries at once.
|
Configuration.Builder |
setAll(XGettingCollection<KeyValue<String,String>> properties)
Sets many entries at once.
|
Configuration.Builder |
valueMapperProvider(ConfigurationValueMapperProvider valueMapperProvider)
Sets the
ConfigurationValueMapperProvider. |
default <S> Configuration.Builder map(ConfigurationMapper<S> mapper, S source)
S - the source typemapper - the mapper for the sourcesource - the input sourceConfigurationMapperdefault Configuration.Builder load(ConfigurationLoader loader, ConfigurationParser parser)
loader - the loader to retrieve the inputparser - the parser to parse the inputConfigurationLoader,
ConfigurationParserConfiguration.Builder valueMapperProvider(ConfigurationValueMapperProvider valueMapperProvider)
ConfigurationValueMapperProvider.
Use this method to insert user-defined value mappers.valueMapperProvider - the new mapper providerConfiguration.Builder set(String key, String value)
key - simple or full-qualified key, cannot be empty or nullvalue - the value to set, cannot be nullConfiguration.Builder setAll(XGettingCollection<KeyValue<String,String>> properties)
properties - the key-value pairsset(String, String)Configuration.Builder setAll(KeyValue<String,String>... properties)
properties - the key-value pairsset(String, String)Configuration.Builder child(String key)
key - the key for the child configurationchild(String, Consumer)default Configuration.Builder child(String key, Consumer<Configuration.Builder> childBuilder)
key - the key for the child configurationchildBuilder - the builder consumer for method chainingConfiguration buildConfiguration()
Configuration.Configuration with all values and child-configurations from this builderCopyright © 2022 MicroStream Software. All rights reserved.