- java.lang.Object
-
- io.github.mmm.base.config.ConfigMap
-
- Direct Known Subclasses:
MarshallingConfig
public class ConfigMap extends Object
Simple wrapper for aMap
with configuration.- Since:
- 1.0.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
get(ConfigOption<T> option)
Map<String,Object>
getMap()
<T> T
set(ConfigOption<T> key, T value)
String
toString()
-
-
-
Method Detail
-
get
public <T> T get(ConfigOption<T> option)
- Type Parameters:
T
- type of config value.- Parameters:
option
- theConfigOption
.- Returns:
- the configuration value for the given
ConfigOption
.
-
set
public <T> T set(ConfigOption<T> key, T value)
- Type Parameters:
T
- type of config value.- Parameters:
key
- theConfigOption
.value
- the new configuration value for the givenConfigOption
.- Returns:
- the old configuration value that was previously associated with the given
ConfigOption
. Will benull
if no value was configured before.
-
-