org.apache.felix.webconsole
Class DefaultVariableResolver
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap
org.apache.felix.webconsole.DefaultVariableResolver
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.util.Map, VariableResolver
public class DefaultVariableResolver
- extends java.util.HashMap
- implements VariableResolver
The DefaultVariableResolver is a HashMap based
default implementation of the VariableResolver interface. It may
be used by plugins to implement the interface for the request and is also
used by the
WebConsoleUtil.getVariableResolver(javax.servlet.ServletRequest)
as the variable resolver if none has yet been assigned to the request.
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from class java.util.AbstractMap |
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
|
Constructor Summary |
DefaultVariableResolver()
Creates a new variable resolver with default capacity. |
DefaultVariableResolver(int initialCapacity)
Creates a new variable resolver with specified initial capacity |
DefaultVariableResolver(int initialCapacity,
float loadFactor)
Creates a new variable resolver and initializes both - capacity & load factor |
DefaultVariableResolver(java.util.Map source)
Creates a new variable resolver copying the variables from the given map. |
|
Method Summary |
java.lang.String |
resolve(java.lang.String variable)
Returns the string representation of the value stored under the variable
name in this map. |
| Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
equals, hashCode |
DefaultVariableResolver
public DefaultVariableResolver()
- Creates a new variable resolver with default capacity.
DefaultVariableResolver
public DefaultVariableResolver(int initialCapacity,
float loadFactor)
- Creates a new variable resolver and initializes both - capacity & load factor
- Parameters:
initialCapacity - the initial capacity of the variable containerloadFactor - the load factor of the variable container- See Also:
HashMap.HashMap(int, float)
DefaultVariableResolver
public DefaultVariableResolver(int initialCapacity)
- Creates a new variable resolver with specified initial capacity
- Parameters:
initialCapacity - the initial capacity of the variable container- See Also:
HashMap.HashMap(int)
DefaultVariableResolver
public DefaultVariableResolver(java.util.Map source)
- Creates a new variable resolver copying the variables from the given map.
- Parameters:
source - the map whose variables are to be placed in this resolver.- See Also:
HashMap.HashMap(Map)
resolve
public java.lang.String resolve(java.lang.String variable)
- Returns the string representation of the value stored under the variable
name in this map. If no value is stored under the variable name,
null is returned.
- Specified by:
resolve in interface VariableResolver
- Parameters:
variable - The name of the variable whose value is to be returned.
- Returns:
- The variable value or
null if there is no entry
with the given name in this map.
Copyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.