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:
- java.io.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 java.util.Map |
map
|
| Fields inherited from class com.agimatec.commons.config.Node |
name |
|
Constructor Summary |
MapNode()
create an instance with a new Map |
MapNode(java.util.Map aMap)
create an instance on the given map |
|
Method Summary |
java.lang.Object |
get(java.lang.Object key)
get a value from the receiver's map |
java.util.Map |
getMap()
|
java.lang.Object |
getObjectValue()
|
void |
put(Node node)
put a named Node into the receiver's map |
void |
put(java.lang.Object key,
java.lang.Object value)
put a value into the receiver's map |
| Methods inherited from class com.agimatec.commons.config.CompositeNode |
getBoolean, getDouble, getFilePath, getInt, getInt, getList, getLong, getMap, getNode, getString, getURLPath |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
map
protected final java.util.Map map
MapNode
public MapNode()
- create an instance with a new Map
MapNode
public MapNode(java.util.Map aMap)
- create an instance on the given map
- Parameters:
aMap -
getObjectValue
public java.lang.Object getObjectValue()
- Specified by:
getObjectValue in class Node
- Returns:
- a Map
getMap
public java.util.Map getMap()
- Returns:
- a Map
get
public java.lang.Object get(java.lang.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(java.lang.Object key,
java.lang.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-2012. All Rights Reserved.