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, values
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public RequestMap(javax.servlet.http.HttpServletRequest request)
request
- the http servlet request.public void clear()
clear
in interface Map
clear
in class AbstractMap
public Set entrySet()
entrySet
in interface Map
entrySet
in class AbstractMap
public Object get(Object key)
get
in interface Map
get
in class AbstractMap
key
- the name of the request attribute.public Object put(Object key, Object value)
put
in interface Map
put
in class AbstractMap
key
- the name of the request attribute.value
- the value to set.public Object remove(Object key)
remove
in interface Map
remove
in class AbstractMap
key
- the name of the attribute to remove.Copyright © 2000–2020 Apache Software Foundation. All rights reserved.