|
SourceJammer 1.2.0.1 May 20, 2002 Copyright (c) 2001, 2002 Robert MacGrogan |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.sourcejammer.project.NodeList
A linked and indexed colletion of Nodes. Each node within a NodeList must have a unique name.
Constructor Summary | |
NodeList()
|
Method Summary | |
void |
addNode(Node node)
Adds a node to the list. |
Node[] |
getContentsAsArray()
Provided to dump contents of NodeList to an array of Nodes. |
NodeIterator |
getIterator()
Returns a NodeIterator for iterating through the contents of this NodeList. |
java.lang.String[] |
getListNames()
Returns the names of nodes in the list. |
Node |
getNode(int index)
Returns a Node based on it's index value. |
Node |
getNode(java.lang.String nodeName)
Returns a Node based on it's unique name. |
Node |
removeNode(int index)
Removes a Node from the NodeList based on it's index value. |
Node |
removeNode(java.lang.String nodeName)
Removes a Node from the NodeList based on it's unique name. |
void |
setContentsFromArray(Node[] nodes)
Provided to set this NodeList using an array of Nodes. |
int |
size()
Returns the number of nodes in the ilst. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NodeList()
Method Detail |
public Node[] getContentsAsArray()
public void setContentsFromArray(Node[] nodes) throws NodeExistsException
NodeExistsException
- if the array contains more than one node with
the same nodename.public void addNode(Node node) throws NodeExistsException
node
- -- the Node to be added.NodeExistsException
- if a Node with the same name
is already in the NodeList.public Node getNode(int index) throws NodeDoesNotExistException
public Node getNode(java.lang.String nodeName) throws NodeDoesNotExistException
public Node removeNode(int index) throws NodeDoesNotExistException
index
- -- index of the Node to be removed.NodeDoesNotExistException
- -- if there is no node
at the specified index.public Node removeNode(java.lang.String nodeName) throws NodeDoesNotExistException
name
- -- name of the Node to be removed.NodeDoesNotExistException
- -- if there is no node
with the specified name.public NodeIterator getIterator()
public int size()
public java.lang.String[] getListNames()
|
SourceJammer 1.2.0.1 May 20, 2002 Copyright (c) 2001, 2002 Robert MacGrogan |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |