public static class Configuration.Default extends Object implements Configuration
Configuration.Builder, Configuration.DefaultKEY_SEPARATOR| Modifier and Type | Method and Description |
|---|---|
Configuration |
child(String key)
Gets the assigned child-configuration of the specified key,
or
null 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 a
Map. |
XGettingTable<String,String> |
coalescedTable()
Converts all entries of this configuration and all child-configurations recursively to a
XGettingTable. |
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,
or
null 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 or
null 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 a
Map. |
Configuration |
parent()
Gets this configuration's parent, or
null if this is the root configuration. |
XGettingTable<String,String> |
table()
Converts all entries of this configuration to a
XGettingTable. |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitBuilder, getBoolean, getByte, getDouble, getFloat, getInteger, getLong, getShort, isRoot, Load, opt, opt, optBoolean, optByte, optDouble, optFloat, optInteger, optLong, optShort, root, storepublic String get(String key)
Configurationnull if the configuration doesn't contain the key.get in interface Configurationkey - the key to look upnullpublic Configuration child(String key)
Configurationnull if the configuration doesn't contain the key.child in interface Configurationkey - the key to look upnullpublic <T> T get(String key, Class<T> type)
Configurationnull if the configuration doesn't contain the key.
The String value is parsed by the registered ConfigurationValueMapper for the specified type.
get in interface ConfigurationT - the value typekey - the key to look uptype - the type to map tonullpublic boolean contains(String key)
Configurationcontains in interface Configurationkey - the key to look uptrue if this configuration contains the key, false otherwisepublic String key()
Configurationnull if this is the root configuration.key in interface Configurationpublic Iterable<String> keys()
Configurationkeys in interface Configurationpublic Iterable<? extends Configuration> children()
Configurationchildren in interface Configurationpublic Configuration parent()
Configurationnull if this is the root configuration.parent in interface Configurationnullpublic void traverse(Consumer<Configuration> consumer)
Configurationtraverse in interface Configurationconsumer - the consumer to accept all configurationspublic XGettingTable<String,String> table()
ConfigurationXGettingTable.table in interface ConfigurationXGettingTable containing all entries of this configurationsConfiguration.coalescedTable()public XGettingTable<String,String> coalescedTable()
ConfigurationXGettingTable.coalescedTable in interface ConfigurationXGettingTable containing all entries of this and all child-configurationspublic Map<String,String> map()
ConfigurationMap.
Because configurations are immutable, changes made in the resulting map will not reflect back.
map in interface ConfigurationMap containing all entries of this configurationsConfiguration.coalescedMap()public Map<String,String> coalescedMap()
ConfigurationMap.
Because configurations are immutable, changes made in the resulting map will not reflect back.
coalescedMap in interface ConfigurationMap containing all entries of this and all child-configurationspublic ConfigurationValueMapperProvider valueMapperProvider()
ConfigurationvalueMapperProvider in interface ConfigurationConfiguration.get(String, Class)public Configuration detach()
ConfigurationThe original configuration (this) remains untouched.
detach in interface ConfigurationCopyright © 2022 MicroStream Software. All rights reserved.