Class ParameterMap
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,
String[]>
The Class ParameterMap.
Created: 2008. 06. 11 PM 8:55:13
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new ParameterMap.ParameterMap
(int initialCapacity) Instantiates a new ParameterMap.ParameterMap
(Map<String, String[]> params) Instantiates a new ParameterMap. -
Method Summary
Modifier and TypeMethodDescriptionextractAsMap
(Map<String, Object> targetMap) getParameter
(String name) Returns the string value to which the specified name is mapped, ornull
if this map contains no mapping for the name.Returns aCollection
ofString
objects containing the names of the parameters.String[]
getParameterValues
(String name) Returns the string values to which the specified name is mapped, ornull
if this map contains no mapping for the name.void
Set the given parameters under.void
setParameter
(String name, String value) Sets the value to the parameter with the given name.void
setParameterValues
(String name, String[] values) Sets the values to the parameter with the given name.Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Constructor Details
-
ParameterMap
public ParameterMap()Instantiates a new ParameterMap. -
ParameterMap
public ParameterMap(int initialCapacity) Instantiates a new ParameterMap.- Parameters:
initialCapacity
- the initial capacity
-
ParameterMap
Instantiates a new ParameterMap.- Parameters:
params
- the other parameter map
-
-
Method Details
-
getParameter
Returns the string value to which the specified name is mapped, ornull
if this map contains no mapping for the name.- Parameters:
name
- the parameter name- Returns:
- a
String
representing the single value of the parameter
-
getParameterValues
Returns the string values to which the specified name is mapped, ornull
if this map contains no mapping for the name.- Parameters:
name
- the parameter name- Returns:
- an array of
String
objects containing the parameter's values
-
setParameter
Sets the value to the parameter with the given name.- Parameters:
name
- aString
specifying the name of the parametervalue
- aString
representing the single value of the parameter- See Also:
-
setParameterValues
Sets the values to the parameter with the given name.- Parameters:
name
- aString
specifying the name of the parametervalues
- an array ofString
objects containing the parameter's values- See Also:
-
getParameterNames
Returns aCollection
ofString
objects containing the names of the parameters. If no parameters, the method returns an emptyCollection
.- Returns:
- a
Collection
ofString
objects, eachString
containing the name of a parameter; or an emptyCollection
if no parameters
-
setAll
Set the given parameters under.- Parameters:
params
- the other parameter map
-
extractAsMap
-
extractAsMap
-