public class Defaults extends Object
Constructor and Description |
---|
Defaults()
Creates a new, empty Defaults object.
|
Modifier and Type | Method and Description |
---|---|
void |
addDefault(String paramID,
String defaultValue)
Adds a single default value to any that might already be defined for the
parameter with the the specified ID.
|
void |
addDefault(String paramID,
String[] defaultValue)
Adds an array of default values to any that might already be defined for
the parameter with the the specified ID.
|
String[] |
getDefault(String paramID)
Returns an array of the default values defined for the parameter with
the specified ID, or null if no default values are defined.
|
Iterator |
idIterator()
Returns an Iterator over the unique IDs of all parameters with defaults
defined in this Defaults object.
|
void |
setDefault(String paramID,
String defaultValue)
Sets a single default value for the parameter with the specified ID.
|
void |
setDefault(String paramID,
String[] defaultValue)
Sets an array of default values for the parameter with the specified ID.
|
protected void |
setDefaultIfNeeded(String paramID,
String defaultValue)
Sets a single default value for the parameter with the specified ID if
and only if the specified parameter currently has no default values.
|
protected void |
setDefaultIfNeeded(String paramID,
String[] defaultValue)
Sets an array of default values for the parameter with the specified ID
if and only if the specified parameter currently has no default values.
|
public void setDefault(String paramID, String defaultValue)
paramID
- the unique ID of the parameter for which the specified
value is the default.defaultValue
- the new default value for the specified parameter.public void setDefault(String paramID, String[] defaultValue)
paramID
- the unique ID of the parameter for which the specified
values are the defaults.defaultValue
- the new default values for the specified parameter.public void addDefault(String paramID, String defaultValue)
paramID
- the unique ID of the parameter for which the specified
value is an additional default.defaultValue
- the default value to add to the specified parameter.public void addDefault(String paramID, String[] defaultValue)
paramID
- the unique ID of the parameter for which the specified
value is an additional default.defaultValue
- the default values to add to the specified parameter.protected void setDefaultIfNeeded(String paramID, String defaultValue)
paramID
- the unique ID of the parameter for which the specified
value is the default.defaultValue
- the new default value for the specified parameter.protected void setDefaultIfNeeded(String paramID, String[] defaultValue)
paramID
- the unique ID of the parameter for which the specified
value is the default.defaultValue
- the new default values for the specified parameter.public String[] getDefault(String paramID)
paramID
- the unique ID of the parameter for which default values
are desired.Copyright © 2015. All rights reserved.