com.agimatec.commons.config
Class MapNode
java.lang.Object
com.agimatec.commons.config.Node
com.agimatec.commons.config.CompositeNode
com.agimatec.commons.config.MapNode
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- Config
public class MapNode
- extends CompositeNode
A config node representing a map with nodes.
- Author:
- Roman Stumm
- See Also:
- Serialized Form
|
Field Summary |
protected Map |
map
|
| Fields inherited from class com.agimatec.commons.config.Node |
name |
|
Constructor Summary |
MapNode()
create an instance with a new Map |
MapNode(Map aMap)
create an instance on the given map |
| Methods inherited from class com.agimatec.commons.config.CompositeNode |
getBoolean, getDouble, getFilePath, getInt, getInt, getList, getLong, getMap, getNode, getString, getURLPath |
map
protected final Map map
MapNode
public MapNode()
- create an instance with a new Map
MapNode
public MapNode(Map aMap)
- create an instance on the given map
- Parameters:
aMap -
getObjectValue
public Object getObjectValue()
- Specified by:
getObjectValue in class Node
- Returns:
- a Map
getMap
public Map getMap()
- Returns:
- a Map
get
public Object get(Object key)
- get a value from the receiver's map
- Parameters:
key - - a key in this MapNode's map
- Returns:
- the value or null (if not found)
put
public void put(Object key,
Object value)
- put a value into the receiver's map
- Parameters:
key - value -
put
public void put(Node node)
- put a named Node into the receiver's map
- Parameters:
node - - needs a name
Copyright © 2008-2011. All Rights Reserved.