java.lang.Object
io.github.mmm.base.config.ConfigMap
Simple wrapper for a
Map with configuration.- Since:
- 1.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Tget(ConfigOption<T> option) getMap()<T> Tset(ConfigOption<T> key, T value) toString()
-
Constructor Details
-
ConfigMap
public ConfigMap()The constructor. -
ConfigMap
The constructor.- Parameters:
map- the rawMapwith the configuration values.
-
-
Method Details
-
get
- Type Parameters:
T- type of config value.- Parameters:
option- theConfigOption.- Returns:
- the configuration value for the given
ConfigOption.
-
set
- 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.
-
getMap
- Returns:
- the raw
Mapwith the configuration.
-
toString
-