public class NamedParamsDefault extends Object implements NamedParams
Constructor and Description |
---|
NamedParamsDefault()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
activateParameters()
Activate the currently set parameters
|
void |
addParameterDefinition(String key,
String defValue,
String description)
Add a parameter definition to this set.
|
void |
clearParameters()
Clear all parameters
|
void |
copyParametersFrom(NamedParams aParam)
Copy params to these named parameters (clearing out first).
|
void |
eraseParameters()
Clear the values.
|
String |
getParameterDefault(String key)
Get the default value of a parameter.
|
String |
getParameterDescription(String key)
Get the description of a parameter.
|
String |
getParameterValue(String key)
Get the value of a parameter.
|
String[] |
listParameters()
List the parameters.
|
void |
setParameterValue(String key,
String value)
Set the value of a parameter.
|
public void addParameterDefinition(String key, String defValue, String description) throws DuplicateParamException
NamedParams
addParameterDefinition
in interface NamedParams
key
- Name of the parameter.defValue
- default value.description
- Description of the parameter.DuplicateParamException
- Upon duplicate parameter definitionspublic String getParameterDescription(String key) throws UnknownParamException
NamedParams
getParameterDescription
in interface NamedParams
key
- Key to get value for.UnknownParamException
- Parameter 'key' is unknown.public String getParameterValue(String key) throws UnknownParamException
NamedParams
getParameterValue
in interface NamedParams
key
- Key to get value for.UnknownParamException
- Parameter 'key' is unknown.public String getParameterDefault(String key) throws UnknownParamException
NamedParams
getParameterDefault
in interface NamedParams
key
- Key to get value for.UnknownParamException
- Parameter 'key' is unknown.public String[] listParameters()
NamedParams
listParameters
in interface NamedParams
public void setParameterValue(String key, String value)
NamedParams
setParameterValue
in interface NamedParams
key
- key to set value ofvalue
- value to set it to.public void eraseParameters()
NamedParams
eraseParameters
in interface NamedParams
public void clearParameters()
NamedParams
clearParameters
in interface NamedParams
public void activateParameters()
NamedParams
activateParameters
in interface NamedParams
public void copyParametersFrom(NamedParams aParam)
NamedParams
copyParametersFrom
in interface NamedParams
aParam
- the parameters to copy from.