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>extractAsMap()java.util.Map<java.lang.String,java.lang.Object>extractAsMap(java.util.Map<java.lang.String,java.lang.Object> targetMap)java.lang.StringgetParameter(java.lang.String name)Returns the string value to which the specified name is mapped, ornullif this map contains no mapping for the name.java.util.Set<java.lang.String>getParameterNames()Returns aCollectionofStringobjects 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, ornullif this map contains no mapping for the name.voidsetAll(java.util.Map<java.lang.String,java.lang.String> params)Set the given parameters under.voidsetParameter(java.lang.String name, java.lang.String value)Sets the value to the parameter with the given name.voidsetParameterValues(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, ornullif this map contains no mapping for the name.- Parameters:
name- the parameter name- Returns:
- a
Stringrepresenting 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, ornullif this map contains no mapping for the name.- Parameters:
name- the parameter name- Returns:
- an array of
Stringobjects 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- aStringspecifying the name of the parametervalue- aStringrepresenting 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- aStringspecifying the name of the parametervalues- an array ofStringobjects containing the parameter's values- See Also:
setParameter(java.lang.String, java.lang.String)
-
getParameterNames
public java.util.Set<java.lang.String> getParameterNames()
Returns aCollectionofStringobjects containing the names of the parameters. If no parameters, the method returns an emptyCollection.- Returns:
- a
CollectionofStringobjects, eachStringcontaining the name of a parameter; or an emptyCollectionif 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
-
extractAsMap
public java.util.Map<java.lang.String,java.lang.Object> extractAsMap()
-
extractAsMap
public java.util.Map<java.lang.String,java.lang.Object> extractAsMap(java.util.Map<java.lang.String,java.lang.Object> targetMap)
-
-