org.apache.struts2.dispatcher
类 ApplicationMap

java.lang.Object
  继承者 java.util.AbstractMap
      继承者 org.apache.struts2.dispatcher.ApplicationMap
所有已实现的接口:
Serializable, Map

public class ApplicationMap
extends AbstractMap
implements Serializable

A simple implementation of the Map interface to handle a collection of attributes and init parameters in a ServletContext object. The entrySet() method enumerates over all servlet context attributes and init parameters and returns a collection of both. Note, this will occur lazily - only when the entry set is asked for.

另请参见:
序列化表格

嵌套类摘要
 
从类 java.util.AbstractMap 继承的嵌套类/接口
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
从接口 java.util.Map 继承的嵌套类/接口
Map.Entry<K,V>
 
构造方法摘要
ApplicationMap(javax.servlet.ServletContext ctx)
          Creates a new map object given the servlet context.
 
方法摘要
 void clear()
          Removes all entries from the Map and removes all attributes from the servlet context.
 Set entrySet()
          Creates a Set of all servlet context attributes as well as context init parameters.
 Object get(Object key)
          Returns the servlet context attribute or init parameter based on the given key.
 Object put(Object key, Object value)
          Sets a servlet context attribute given a attribute name and value.
 Object remove(Object key)
          Removes the specified servlet context attribute.
 
从类 java.util.AbstractMap 继承的方法
containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toString, values
 
从类 java.lang.Object 继承的方法
getClass, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

ApplicationMap

public ApplicationMap(javax.servlet.ServletContext ctx)
Creates a new map object given the servlet context.

参数:
ctx - the servlet context
方法详细信息

clear

public void clear()
Removes all entries from the Map and removes all attributes from the servlet context.

指定者:
接口 Map 中的 clear
覆盖:
AbstractMap 中的 clear

entrySet

public Set entrySet()
Creates a Set of all servlet context attributes as well as context init parameters.

指定者:
接口 Map 中的 entrySet
指定者:
AbstractMap 中的 entrySet
返回:
a Set of all servlet context attributes as well as context init parameters.

get

public Object get(Object key)
Returns the servlet context attribute or init parameter based on the given key. If the entry is not found, null is returned.

指定者:
接口 Map 中的 get
覆盖:
AbstractMap 中的 get
参数:
key - the entry key.
返回:
the servlet context attribute or init parameter or null if the entry is not found.

put

public Object put(Object key,
                  Object value)
Sets a servlet context attribute given a attribute name and value.

指定者:
接口 Map 中的 put
覆盖:
AbstractMap 中的 put
参数:
key - the name of the attribute.
value - the value to set.
返回:
the attribute that was just set.

remove

public Object remove(Object key)
Removes the specified servlet context attribute.

指定者:
接口 Map 中的 remove
覆盖:
AbstractMap 中的 remove
参数:
key - the attribute to remove.
返回:
the entry that was just removed.