All Packages Class Hierarchy This Package Previous Next Index
Class ca.carleton.sce.ucmagents.lfmparse.SimpleNode
ca.carleton.sce.ucmagents.lfmparse.SimpleNode
- public class SimpleNode
- implements Node
Default SimpleNode, generated by jjtree.
Addition of name and description variables,
with access methods getName, setName, getDescription, setDescription.
It was built using jjtree 0.3.5.
- Version:
- 1.00, 1998 01 04
- Author:
- Daniel Amyot, damyot@csi.uottawa.ca
- See Also:
- Node, lfmparseConstants
-
children
-
-
description
-
New variable that contains the (optional) description associated to the current node.
-
id
-
The integer
id
can be related to the node type (a String) via an array in lfmparseConstants.
-
name
-
New variable that contains the name of the current node.
-
parent
-
-
parser
-
-
SimpleNode(int)
-
-
SimpleNode(lfmparse, int)
-
-
dump(String)
- Displays the content of the current node and of its children.
-
getDescription()
- Get the description of the node.
-
getName()
- Get the name of the node.
-
jjtAddChild(Node, int)
- This method tells the node to add its argument to the node's
list of children.
-
jjtClose()
- This method is called after all the child nodes have been
added.
-
jjtGetChild(int)
- This method returns a child node.
-
jjtGetNumChildren()
- Return the number of children the node has.
-
jjtGetParent()
- This method is used to inform the node of its
parent.
-
jjtOpen()
- This method is called after the node has been made the current
node.
-
jjtSetParent(Node)
- This method is used to inform the node of its
parent.
-
setDescription(String)
- Set the description of the node.
-
setName(String)
- Set the name of the node.
-
toString()
-
-
toString(String)
-
parent
protected Node parent
children
protected Node children[]
id
protected int id
- The integer
id
can be related to the node type (a String) via an array in lfmparseConstants.
- See Also:
- lfmparseConstants
parser
protected lfmparse parser
name
protected String name
- New variable that contains the name of the current node.
description
protected String description
- New variable that contains the (optional) description associated to the current node.
SimpleNode
public SimpleNode(int i)
SimpleNode
public SimpleNode(lfmparse p,
int i)
jjtOpen
public void jjtOpen()
- This method is called after the node has been made the current
node. It indicates that child nodes can now be added to it.
jjtClose
public void jjtClose()
- This method is called after all the child nodes have been
added.
jjtSetParent
public void jjtSetParent(Node n)
- This method is used to inform the node of its
parent.
jjtGetParent
public Node jjtGetParent()
- This method is used to inform the node of its
parent.
jjtAddChild
public void jjtAddChild(Node n,
int i)
- This method tells the node to add its argument to the node's
list of children.
jjtGetChild
public Node jjtGetChild(int i)
- This method returns a child node. The children are numbered
from zero, left to right.
jjtGetNumChildren
public int jjtGetNumChildren()
- Return the number of children the node has.
toString
public String toString()
toString
public String toString(String prefix)
setName
public void setName(String n)
- Set the name of the node.
getName
public String getName()
- Get the name of the node.
- Returns:
- the name of the node
setDescription
public void setDescription(String n)
- Set the description of the node.
Also, remove the delimiters from the description.
getDescription
public String getDescription()
- Get the description of the node.
- Returns:
- the description of the node (without any delimiters)
dump
public void dump(String prefix)
- Displays the content of the current node and of its children.
All Packages Class Hierarchy This Package Previous Next Index