java.lang.Object
io.github.mmm.base.variable.VariableDefinition<T>
- Type Parameters:
T- type of the value for this option. SeegetType().
Definition of a variable for a
VariableMap. It is a simple container for the name of the
variable with its getDefaultValue() and its type making the
access of the value type-safe.- Since:
- 1.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionVariableDefinition(String name, Class<T> type) The constructor.VariableDefinition(String name, Class<T> type, T defaultValue) The constructor.VariableDefinition(String name, T defaultValue) The constructor. -
Method Summary
-
Constructor Details
-
VariableDefinition
The constructor. -
VariableDefinition
The constructor.- Parameters:
name- thename.defaultValue- thedefault value.
-
VariableDefinition
The constructor.- Parameters:
name- thename.type- thetype.defaultValue- thedefault value.
-
-
Method Details
-
getName
- Returns:
- the name of the variable used as
keytoget its value.
-
getType
- Returns:
- the
Classreflecting the value of this variable.
-
getDefaultValue
- Returns:
- the optional default value to use if the variable is not explicitly defined.
-
toString
-