Class ParameterMap
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<java.lang.String,java.lang.String[]>
-
- com.aspectran.core.activity.request.ParameterMap
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.util.Map<java.lang.String,java.lang.String[]>
public class ParameterMap extends java.util.LinkedHashMap<java.lang.String,java.lang.String[]>
The Class ParameterMap.Created: 2008. 06. 11 PM 8:55:13
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ParameterMap()
Instantiates a new ParameterMap.ParameterMap(int initialCapacity)
Instantiates a new ParameterMap.ParameterMap(java.util.Map<java.lang.String,java.lang.String[]> params)
Instantiates a new ParameterMap.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>
extractParameters()
java.util.Map<java.lang.String,java.lang.Object>
extractParameters(java.util.Map<java.lang.String,java.lang.Object> targetMap)
java.lang.String
getParameter(java.lang.String name)
Returns the string value to which the specified name is mapped, ornull
if this map contains no mapping for the name.java.util.Collection<java.lang.String>
getParameterNames()
Returns aCollection
ofString
objects containing the names of the parameters.java.lang.String[]
getParameterValues(java.lang.String name)
Returns the string values to which the specified name is mapped, ornull
if this map contains no mapping for the name.void
setAll(java.util.Map<java.lang.String,java.lang.String> params)
Set the given parameters under.void
setParameter(java.lang.String name, java.lang.String value)
Sets the value to the parameter with the given name.void
setParameterValues(java.lang.String name, java.lang.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
-
-
-
-
Constructor Detail
-
ParameterMap
public ParameterMap()
Instantiates a new ParameterMap.
-
ParameterMap
public ParameterMap(int initialCapacity)
Instantiates a new ParameterMap.- Parameters:
initialCapacity
- the initial capacity
-
ParameterMap
public ParameterMap(java.util.Map<java.lang.String,java.lang.String[]> params)
Instantiates a new ParameterMap.- Parameters:
params
- the other parameter map
-
-
Method Detail
-
getParameter
public java.lang.String getParameter(java.lang.String name)
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
public java.lang.String[] getParameterValues(java.lang.String name)
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
public void setParameter(java.lang.String name, java.lang.String value)
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(String, String[])
-
setParameterValues
public void setParameterValues(java.lang.String name, java.lang.String[] values)
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:
setParameter(java.lang.String, java.lang.String)
-
getParameterNames
public java.util.Collection<java.lang.String> 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
public void setAll(java.util.Map<java.lang.String,java.lang.String> params)
Set the given parameters under.- Parameters:
params
- the other parameter map
-
extractParameters
public java.util.Map<java.lang.String,java.lang.Object> extractParameters()
-
extractParameters
public java.util.Map<java.lang.String,java.lang.Object> extractParameters(java.util.Map<java.lang.String,java.lang.Object> targetMap)
-
-