org.apache.velocity.context
public abstract class AbstractContext extends InternalContextBase implements Context, Serializable
Version: $Id: AbstractContext.java,v 1.8.8.1 2004/03/03 23:22:54 geirm Exp $
Field Summary | |
---|---|
Context | innerContext
the chained Context if any |
Constructor Summary | |
---|---|
AbstractContext()
default CTOR | |
AbstractContext(Context inner)
Chaining constructor accepts a Context argument.
|
Method Summary | |
---|---|
boolean | containsKey(Object key)
Indicates whether the specified key is in the context. |
Object | get(String key)
Gets the value corresponding to the provided key from the context.
|
Context | getChainedContext()
returns innerContext if one is chained
|
Object[] | getKeys()
Get all the keys for the values in the context |
abstract boolean | internalContainsKey(Object key)
Implement to determine if a key is in the storage.
|
abstract Object | internalGet(String key)
Implement to return a value from the context storage.
|
abstract Object[] | internalGetKeys()
Implement to return an object array of key
strings from your storage.
|
abstract Object | internalPut(String key, Object value)
Implement to put a value into the context storage.
|
abstract Object | internalRemove(Object key)
I mplement to remove an item from your storage.
|
Object | put(String key, Object value)
Adds a name/value pair to the context.
|
Object | remove(Object key)
Removes the value associated with the specified key from the context.
|
Parameters: inner context to be chained
Parameters: key The key to look for.
Returns: true if the key is in the context, false if not.
Parameters: key The name of the desired value.
Returns: The value corresponding to the provided key or null if the key param is null.
Returns: Context if chained, null
if not
Returns: Object[] of keys in the Context. Does not return keys in chained context.
Parameters: key key to test for existance
Returns: true if found, false if not
Parameters: key key whose associated value is to be returned
Returns: object stored in the context
Returns: array of keys
Parameters: key key with which to associate the value value value to be associated with the key
Returns: previously stored value if exists, or null
Parameters: key key to remove
Returns: object removed if exists, else null
Parameters: key The name to key the provided value with. value The corresponding value.
Returns: Object that was replaced in the the Context if applicable or null if not.
Parameters: key The name of the value to remove.
Returns: The value that the key was mapped to, or null
if unmapped.