|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IParameterMap
Represents a map containing all parameter of a IParameterizable
object.
Represents a map with strings as keys and IParameter objects as
values and should fully describe a parameterizable object.
Identified via type of parameterizable object - see getType()
The implementation is not required to be thread safe.
| Method Summary | ||
|---|---|---|
void |
clear()
Deletes the whole contenst of the map. |
|
boolean |
contains(String key)
Returns true if this parameter map contains a parameter with
the specified key. |
|
IParameterMap |
copy()
Creates the deep copy of the map. |
|
IParameter |
get(String key)
Gets a parameter stored in the map under the specified key. |
|
|
get(String key,
Class<T> clazz)
Gets the parameter of the specified class associated with the specified key. |
|
Class<? extends IParameterizable> |
getType()
Gets a type of the map - class of the parameterizable object which configuration is contained in the map. |
|
void |
put(String key,
IParameter parameter)
Stores the specified parameter under the specified key in the map. |
|
IParameter |
remove(String key)
Removes the parameter assigned to the specified key from the map. |
|
IParameter |
replace(String key,
IParameter param)
Replaces the parameter stored in the map under the specified key with the specified parameter instance. |
|
int |
size()
Gets the number of parameters in the map. |
|
IParameter |
tryGet(String key)
Gets the parameter associated with the specified key. |
|
|
tryGet(String key,
Class<T> clazz)
Gets the parameter of the specified class associated with the specified key. |
|
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Method Detail |
|---|
Class<? extends IParameterizable> getType()
boolean contains(String key)
true if this parameter map contains a parameter with
the specified key.
key - parameter id in the map
true if this parameter map contains the specified
parameterIParameter get(String key)
key - parameter id in the map.
IllegalArgumentException - if the key not found in the map or is null.
void put(String key,
IParameter parameter)
key - key assigned to the stored parameterparameter - parameter to store
IllegalArgumentException - if the specified key is already contained in the map or is
null.IParameter remove(String key)
key - key of the parameter to remove
IllegalArgumentException - if key does not exist or is nullvoid clear()
int size()
IParameterMap copy()
copy in interface IParameterIParameter tryGet(String key)
key - parameter id in the map
null,
if the key was not found in the map.
<T extends IParameter> T tryGet(String key,
Class<T> clazz)
T - type of the requested parameterkey - parameter id in the mapclazz - class of the parameter that should be returned.This class must
be exactly the same as the class of the requested parameter.
null,
if the key was not found in the map.
IllegalArgumentException - if the parameter associated with the specified key is not of
the specified class, or if key or
clazz are null
<T extends IParameter> T get(String key,
Class<T> clazz)
T - type of the requested parameterkey - parameter id in the mapclazz - class of the parameter that should be returned.This class must
be exactly the same as the class of the requested parameter.
null,
if the key was not found in the map.
IllegalArgumentException - if the parameter associated with the specified key is not of
the specified class, key not found or if key or
clazz are null
IParameter replace(String key,
IParameter param)
If no parameter is stored under the specified key just puts the parameter into the map under that key.
key - key of the parameter to replaceparam - parameter to replace the existing parameter with.
null if no parameter
was replaced
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||