- java.lang.Object
-
- io.github.mmm.base.config.ConfigMap
-
- Direct Known Subclasses:
MarshallingConfig
public class ConfigMap extends Object
Simple wrapper for aMapwith configuration.- Since:
- 1.0.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tget(ConfigOption<T> option)Map<String,Object>getMap()<T> Tset(ConfigOption<T> key, T value)StringtoString()
-
-
-
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 benullif no value was configured before.
-
-