Package io.vertigo.core.param
Class Param
java.lang.Object
io.vertigo.core.param.Param
Represents a configuration parameter.
This class allows the creation of configuration parameters, where each
parameter is identified by a name and has a corresponding value. The name of
a parameter must match a specified pattern, and the value can be of type
String, Integer, or boolean.
-
Method Summary
Modifier and TypeMethodDescriptiongetName()Gets the name of the parameter.getValue()Gets the value of the parameter.<O> OReturns the parameter as a typed value.booleanReturns the parameter as a boolean.intReturns the parameter as an int.longReturns the parameter as a long.Returns the parameter as a String.static ParamCreates a new Integer parameter.static ParamCreates a new parameter.
-
Method Details
-
of
Creates a new Integer parameter.- Parameters:
name- the name of the parametervalue- the value of the parameter- Returns:
- a new parameter
-
of
Creates a new parameter.- Parameters:
name- the name of the parametervalue- the value of the parameter- Returns:
- a new parameter
-
getValue
Gets the value of the parameter.- Returns:
- the value of the parameter
-
getName
Gets the name of the parameter.- Returns:
- the name of the parameter
-
getValue
Returns the parameter as a typed value.- Parameters:
paramType- the type of the parameter- Returns:
- the value of the parameter
-
getValueAsString
Returns the parameter as a String.- Returns:
- the value of the parameter
-
getValueAsInt
public int getValueAsInt()Returns the parameter as an int.- Returns:
- the value of the parameter
-
getValueAsLong
public long getValueAsLong()Returns the parameter as a long.- Returns:
- the value of the parameter
-
getValueAsBoolean
public boolean getValueAsBoolean()Returns the parameter as a boolean.- Returns:
- the value of the parameter
-