Class Configuration.Default
java.lang.Object
one.microstream.configuration.types.Configuration.Default
- All Implemented Interfaces:
Configuration
- Enclosing interface:
- Configuration
public static class Configuration.Default extends Object implements Configuration
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.configuration.types.Configuration
Configuration.Builder, Configuration.Default
-
Field Summary
-
Method Summary
Modifier and Type Method Description Configuration
child(String key)
Gets the assigned child-configuration of the specified key, ornull
if the configuration doesn't contain the key.Iterable<? extends Configuration>
children()
Gets all direct child-configurations.Map<String,String>
coalescedMap()
Converts all entries of this configuration and all child-configurations recursively to aMap
.XGettingTable<String,String>
coalescedTable()
Converts all entries of this configuration and all child-configurations recursively to aXGettingTable
.boolean
contains(String key)
Checks if this configuration contains the specified key.Configuration
detach()
Creates a new Configuration instance with all entries and child-configurations of this configuration, but with no parent, which makes it a root configuration.String
get(String key)
Gets the assigned value of the specified key, ornull
if the configuration doesn't contain the key.<T> T
get(String key, Class<T> type)
Gets the assigned value of the specified key.String
key()
Gets the key of this child-configuration ornull
if this is the root configuration.Iterable<String>
keys()
Gets all keys of this configuration, but not of the child-configurations.Map<String,String>
map()
Converts all entries of this configuration to aMap
.Configuration
parent()
Gets this configuration's parent, ornull
if this is the root configuration.XGettingTable<String,String>
table()
Converts all entries of this configuration to aXGettingTable
.void
traverse(Consumer<Configuration> consumer)
Traverses this and all child-configurations recursively.ConfigurationValueMapperProvider
valueMapperProvider()
Gets the value mapper provider which is assigned to this configuration.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface one.microstream.configuration.types.Configuration
getBoolean, getByte, getDouble, getFloat, getInteger, getLong, getShort, isRoot, opt, opt, optBoolean, optByte, optDouble, optFloat, optInteger, optLong, optShort, root, store
-
Method Details
-
get
Description copied from interface:Configuration
Gets the assigned value of the specified key, ornull
if the configuration doesn't contain the key.- Specified by:
get
in interfaceConfiguration
- Parameters:
key
- the key to look up- Returns:
- the assigned value, or
null
-
child
Description copied from interface:Configuration
Gets the assigned child-configuration of the specified key, ornull
if the configuration doesn't contain the key.- Specified by:
child
in interfaceConfiguration
- Parameters:
key
- the key to look up- Returns:
- the assigned child-configuration, or
null
-
get
Description copied from interface:Configuration
Gets the assigned value of the specified key. ornull
if the configuration doesn't contain the key.The String value is parsed by the registered
ConfigurationValueMapper
for the specified type.- Specified by:
get
in interfaceConfiguration
- Parameters:
key
- the key to look uptype
- the type to map to- Returns:
- the assigned value, or
null
-
contains
Description copied from interface:Configuration
Checks if this configuration contains the specified key.- Specified by:
contains
in interfaceConfiguration
- Parameters:
key
- the key to look up- Returns:
true
if this configuration contains the key,false
otherwise
-
key
Description copied from interface:Configuration
Gets the key of this child-configuration ornull
if this is the root configuration.- Specified by:
key
in interfaceConfiguration
- Returns:
- this child-configuration's key
-
keys
Description copied from interface:Configuration
Gets all keys of this configuration, but not of the child-configurations.- Specified by:
keys
in interfaceConfiguration
- Returns:
- an iterable with all keys
-
children
Description copied from interface:Configuration
Gets all direct child-configurations.- Specified by:
children
in interfaceConfiguration
- Returns:
- all child-configurations
-
parent
Description copied from interface:Configuration
Gets this configuration's parent, ornull
if this is the root configuration.- Specified by:
parent
in interfaceConfiguration
- Returns:
- the parent or
null
-
traverse
Description copied from interface:Configuration
Traverses this and all child-configurations recursively.- Specified by:
traverse
in interfaceConfiguration
- Parameters:
consumer
- the consumer to accept all configurations
-
table
Description copied from interface:Configuration
Converts all entries of this configuration to aXGettingTable
.- Specified by:
table
in interfaceConfiguration
- Returns:
- a
XGettingTable
containing all entries of this configurations - See Also:
Configuration.coalescedTable()
-
coalescedTable
Description copied from interface:Configuration
Converts all entries of this configuration and all child-configurations recursively to aXGettingTable
.- Specified by:
coalescedTable
in interfaceConfiguration
- Returns:
- a
XGettingTable
containing all entries of this and all child-configurations
-
map
Description copied from interface:Configuration
Converts all entries of this configuration to aMap
.Because configurations are immutable, changes made in the resulting map will not reflect back.
- Specified by:
map
in interfaceConfiguration
- Returns:
- a
Map
containing all entries of this configurations - See Also:
Configuration.coalescedMap()
-
coalescedMap
Description copied from interface:Configuration
Converts all entries of this configuration and all child-configurations recursively to aMap
.Because configurations are immutable, changes made in the resulting map will not reflect back.
- Specified by:
coalescedMap
in interfaceConfiguration
- Returns:
- a
Map
containing all entries of this and all child-configurations
-
valueMapperProvider
Description copied from interface:Configuration
Gets the value mapper provider which is assigned to this configuration.- Specified by:
valueMapperProvider
in interfaceConfiguration
- Returns:
- the assigned value mapper
- See Also:
Configuration.get(String, Class)
-
detach
Description copied from interface:Configuration
Creates a new Configuration instance with all entries and child-configurations of this configuration, but with no parent, which makes it a root configuration.The original configuration (this) remains untouched.
- Specified by:
detach
in interfaceConfiguration
- Returns:
- a new, detached configuration
-