org.apache.velocity
public class VelocityContext extends AbstractContext implements Cloneable
Version: $Id: VelocityContext.java,v 1.6.8.1 2004/03/03 22:27:36 geirm Exp $
| Field Summary | |
|---|---|
| Map | context
Storage for key/value pairs. |
| Constructor Summary | |
|---|---|
| VelocityContext()
Creates a new instance (with no inner context). | |
| VelocityContext(Map context)
Creates a new instance with the provided storage (and no inner
context). | |
| VelocityContext(Context innerContext)
Chaining constructor, used when you want to
wrap a context in another. | |
| VelocityContext(Map context, Context innerContext)
Initializes internal storage (never to null), and
inner context.
| |
| Method Summary | |
|---|---|
| Object | clone()
Clones this context object.
|
| boolean | internalContainsKey(Object key)
determines if there is a value for the
given key
|
| Object | internalGet(String key)
retrieves value for key from internal
storage
|
| Object[] | internalGetKeys()
returns array of keys
|
| Object | internalPut(String key, Object value)
stores the value for key to internal
storage
|
| Object | internalRemove(Object key)
remove a key/value pair from the
internal storage
|
Parameters: innerContext The Context implementation to
wrap.
null), and
inner context.
Parameters: context Internal storage, or null to
create default storage. innerContext Inner context.
Returns: A deep copy of this Context.
Parameters: key name of value to check
Returns: true if non-null value in store
Parameters: key name of value to get
Returns: value as object
Returns: keys as []
Parameters: key name of value to store value value to store
Returns: previous value of key as Object
Parameters: key name of value to remove
Returns: value removed