com.agimatec.commons.config
Class MapNode

java.lang.Object
  extended by com.agimatec.commons.config.Node
      extended by com.agimatec.commons.config.CompositeNode
          extended by 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
 
Method Summary
 Object get(Object key)
          get a value from the receiver's map
 Map getMap()
           
 Object getObjectValue()
           
 void put(Node node)
          put a named Node into the receiver's map
 void put(Object key, 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 com.agimatec.commons.config.Node
evaluatePath, getName, setName, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

map

protected final Map map
Constructor Detail

MapNode

public MapNode()
create an instance with a new Map


MapNode

public MapNode(Map aMap)
create an instance on the given map

Parameters:
aMap -
Method Detail

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-2012. All Rights Reserved.