public class RequestMap extends AbstractMap implements Serializable
Map interface to handle a collection of request attributes.AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
RequestMap(javax.servlet.http.HttpServletRequest request)
Saves the request to use as the backing for getting and setting values
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all attributes from the request as well as clears entries in this map.
|
Set |
entrySet()
Returns a Set of attributes from the http request.
|
Object |
get(Object key)
Returns the request attribute associated with the given key or null if it doesn't exist.
|
Object |
put(Object key,
Object value)
Saves an attribute in the request.
|
Object |
remove(Object key)
Removes the specified request attribute.
|
clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toString, valuespublic RequestMap(javax.servlet.http.HttpServletRequest request)
request - the http servlet request.public void clear()
clear in interface Mapclear in class AbstractMappublic Set entrySet()
entrySet in interface MapentrySet in class AbstractMappublic Object get(Object key)
get in interface Mapget in class AbstractMapkey - the name of the request attribute.public Object put(Object key, Object value)
put in interface Mapput in class AbstractMapkey - the name of the request attribute.value - the value to set.public Object remove(Object key)
remove in interface Mapremove in class AbstractMapkey - the name of the attribute to remove.Copyright © 2000–2021 Apache Software Foundation. All rights reserved.