public class PortletSessionMap extends AbstractMap<String,Object>
Map
interface to handle a collection of portlet session
attributes. The entrySet()
method enumerates over all session attributes and creates a Set of entries.
Note, this will occur lazily - only when the entry set is asked for.AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
PortletSessionMap(javax.portlet.PortletRequest request)
Creates a new session map given a portlet request.
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
Set<Map.Entry<String,Object>> |
entrySet() |
Object |
get(Object key)
Returns the session attribute associated with the given key or
null if it doesn't exist.
|
Object |
put(String key,
Object value)
Saves an attribute in the session.
|
Object |
remove(Object key)
Removes the specified session 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 PortletSessionMap(javax.portlet.PortletRequest request)
request
- the portlet request object.public Set<Map.Entry<String,Object>> entrySet()
entrySet
in interface Map<String,Object>
entrySet
in class AbstractMap<String,Object>
Map.entrySet()
public Object get(Object key)
public void clear()
clear
in interface Map<String,Object>
clear
in class AbstractMap<String,Object>
Map.clear()
Copyright © 2000–2020 Apache Software Foundation. All rights reserved.