public final class ParameterMap extends AbstractTypedMap<String,String[],String,String[]> implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
ParameterMap.AccessMode
Defines how the state of the values of a parameter map are managed.
|
AbstractTypedMap.Converter<E,I>| Constructor and Description |
|---|
ParameterMap() |
ParameterMap(Map<String,String[]> delegate) |
ParameterMap(Map<String,String[]> delegate,
ParameterMap.AccessMode accessMode) |
ParameterMap(ParameterMap.AccessMode accessMode) |
| Modifier and Type | Method and Description |
|---|---|
void |
append(Map<String,String[]> params)
Append the content of the argument map to that map.
|
ParameterMap |
as(ParameterMap.AccessMode accessMode) |
static ParameterMap |
clone(Map<String,String[]> map)
Copy the parameter map.
|
static ParameterMap |
clone(Map<String,String[]> map,
ParameterMap.AccessMode accessMode)
Copy the parameter map.
|
ParameterMap.AccessMode |
getAccessMode() |
protected Map<String,String[]> |
getDelegate() |
AbstractTypedMap.Converter<String,String> |
getKeyConverter() |
String |
getValue(String name)
Return the parameter value or null if it does not exist.
|
AbstractTypedMap.Converter<String[],String[]> |
getValueConverter() |
String[] |
getValues(String name)
Return the parameter values or null if it does not exist.
|
void |
setValue(String name,
String value)
Set the a parameter value.
|
void |
setValues(String name,
String[] values)
Set the parameter values.
|
String |
toString() |
static ParameterMap |
wrap(Map<String,String[]> map)
Safely wrap the map as a portlet parameters object.
|
static ParameterMap |
wrap(Map<String,String[]> map,
ParameterMap.AccessMode accessMode)
Safely wrap the map as a portlet parameters object.
|
clear, containsKey, containsValue, convert, entrySet, equals, get, isEmpty, keySet, put, putAll, remove, replace, size, validate, valuespublic ParameterMap()
public ParameterMap(ParameterMap.AccessMode accessMode)
public ParameterMap(Map<String,String[]> delegate, ParameterMap.AccessMode accessMode)
public static ParameterMap clone(Map<String,String[]> map) throws NullPointerException, ClassCastException, IllegalArgumentException
map - the parameter map to copyNullPointerException - if the map contains a null key or a null valueIllegalArgumentException - if the map is null or it contains a value with a zero length array or a null
element in the arrayClassCastException - if the map contains a key that is not a string or a value that is not a string
arraypublic static ParameterMap clone(Map<String,String[]> map, ParameterMap.AccessMode accessMode) throws NullPointerException, ClassCastException, IllegalArgumentException
map - the parameter map to copyaccessMode - the access modeNullPointerException - if the map contains a null key or a null valueIllegalArgumentException - if the map is null or it contains a value with a zero length array or a null
element in the arrayClassCastException - if the map contains a key that is not a string or a value that is not a string
arraypublic static ParameterMap wrap(Map<String,String[]> map)
map - the mappublic static ParameterMap wrap(Map<String,String[]> map, ParameterMap.AccessMode accessMode)
map - the mapaccessMode - the access modepublic ParameterMap.AccessMode getAccessMode()
public ParameterMap as(ParameterMap.AccessMode accessMode)
public AbstractTypedMap.Converter<String,String> getKeyConverter()
getKeyConverter in class AbstractTypedMap<String,String[],String,String[]>public AbstractTypedMap.Converter<String[],String[]> getValueConverter()
getValueConverter in class AbstractTypedMap<String,String[],String,String[]>protected Map<String,String[]> getDelegate()
getDelegate in class AbstractTypedMap<String,String[],String,String[]>public String getValue(String name) throws IllegalArgumentException
name - the parameter nameIllegalArgumentException - if the name is nullpublic String[] getValues(String name) throws IllegalArgumentException
name - the value to getIllegalArgumentException - if the name is nullpublic void setValue(String name, String value) throws IllegalArgumentException
name - the parameter namevalue - the parameter valueIllegalArgumentException - if the name or the value is nullpublic void setValues(String name, String[] values) throws IllegalArgumentException
name - the parameter namevalues - the parameter valuesNullPointerException - if the name or the value is nullIllegalArgumentException - if the name is null or the values is null or the values length is zero or
contains a null elementpublic void append(Map<String,String[]> params) throws ClassCastException, NullPointerException, IllegalArgumentException
params - the parameters to appendsNullPointerException - if the map contains a null key or a null valueIllegalArgumentException - if the map is null or it contains a value with a zero length array or a null
element in the arrayClassCastException - if the map contains a key that is not a string or a value that is not a string
arrayCopyright © 2025 JBoss by Red Hat. All Rights Reserved.