public interface NodeMap<T extends Node> extends Iterable<String>
NodeMap
object represents a map of nodes that
can be set as name value pairs. This typically represents the
attributes that belong to an element and is used as an neutral
way to access an element for either an input or output event.Node
Modifier and Type | Method and Description |
---|---|
T |
get(String name)
This is used to acquire the
Node mapped to the
given name. |
String |
getName()
This is used to get the name of the element that owns the
nodes for the specified map.
|
T |
getNode()
This is used to acquire the actual node this map represents.
|
Iterator<String> |
iterator()
This returns an iterator for the names of all the nodes in
this
NodeMap . |
T |
put(String name,
String value)
This is used to add a new
Node to the map. |
T |
remove(String name)
This is used to remove the
Node mapped to the
given name. |
forEach, spliterator
T getNode()
String getName()
T get(String name)
Node
mapped to the
given name. This returns a name value pair that represents
either an attribute or element. If no node is mapped to the
specified name then this method will return null.name
- this is the name of the node to retrieveT remove(String name)
Node
mapped to the
given name. This returns a name value pair that represents
either an attribute or element. If no node is mapped to the
specified name then this method will return null.name
- this is the name of the node to removeIterator<String> iterator()
NodeMap
. This allows the names to be
iterated within a for each loop in order to extract nodes.T put(String name, String value)
Node
to the map. The
type of node that is created an added is left up to the map
implementation. Once a node is created with the name value
pair it can be retrieved and used.name
- this is the name of the node to be createdvalue
- this is the value to be given to the node