org.araneaframework.core
Class StandardEnvironment
java.lang.Object
org.araneaframework.core.BaseEnvironment
org.araneaframework.core.StandardEnvironment
- All Implemented Interfaces:
- Environment, Serializable
- public class StandardEnvironment
- extends BaseEnvironment
A simple Environment implementation.
- Author:
- "Toomas Römer"
- See Also:
- Serialized Form
StandardEnvironment
public StandardEnvironment(Environment env,
Map entries)
- Constructs an object with the env parent Environment and with the entries data.
- Parameters:
env - the parent environmententries - a map of the entries in the Environment
StandardEnvironment
public StandardEnvironment(Environment env,
Object key,
Object value)
- Constructs an object with the env parent Environment and entries data containing <key, value>.
- Parameters:
env - the parent environmentkey - a key of the value in the map of the Environment entries.value - a value corresponding to given key in the map of the Environment entries.
getEntryMap
public Map getEntryMap()
- Returns the map with the entries in this Environment. An entry is a key value pair.
- Returns:
- a map with the entries.
getEntry
public Object getEntry(Object key)
- Returns the corresponding value of this Envrionment's entries. If none is
found from the entries then the entry is returned from the parent environment.
If a value to the key does not exist, AraneaNoSuchEnvironmentEntryException is thrown.
- Parameters:
key - the key of the entry
- Returns:
- the Object under the key provided
- Throws:
AraneaNoSuchEnvironmentEntryException
toString
public String toString()