java.lang.Object
io.github.mmm.base.variable.VariableMap
- Since:
- 1.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Tget(VariableDefinition<T> variable) booleangetBoolean(VariableDefinition<Boolean> variable) booleangetBoolean(VariableDefinition<Boolean> variable, boolean defaultValue) getMap()<T> Tset(VariableDefinition<T> key, T value) toString()
-
Constructor Details
-
VariableMap
public VariableMap()The constructor. -
VariableMap
The constructor.- Parameters:
map- the rawMapwith the configuration values.
-
-
Method Details
-
get
- Type Parameters:
T- type of config value.- Parameters:
variable- theVariableDefinition.- Returns:
- the value of the given
VariableDefinition.
-
getBoolean
- Parameters:
variable- theVariableDefinition.- Returns:
- the value of the given
VariableDefinition.
-
getBoolean
- Parameters:
variable- theVariableDefinition.defaultValue- the additional default value returned if the variable is undefined and the givenVariableDefinitionhas nodefault value.- Returns:
- the value of the given
VariableDefinition.
-
set
- Type Parameters:
T- type of config value.- Parameters:
key- theVariableDefinition.value- the new configuration value for the givenVariableDefinition.- Returns:
- the old configuration value that was previously associated with the given
VariableDefinition. Will benullif no value was configured before.
-
getMap
- Returns:
- the raw
Mapwith the configuration.
-
toString
-