Class SimpleNode (0.8.0)

public class SimpleNode implements Node

Inheritance

Object > SimpleNode

Implements

Node

Constructors

SimpleNode(Copy p, int i)

public SimpleNode(Copy p, int i)
Parameters
Name Description
p Copy
i int

SimpleNode(int i)

public SimpleNode(int i)
Parameter
Name Description
i int

Fields

children

protected Node[] children
Field Value
Type Description
Node[]

id

protected int id
Field Value
Type Description
int

parent

protected Node parent
Field Value
Type Description
Node

parser

protected Copy parser
Field Value
Type Description
Copy

value

protected Object value
Field Value
Type Description
Object

Methods

childrenAccept(CopyVisitor visitor, Object data)

public Object childrenAccept(CopyVisitor visitor, Object data)

Accept the visitor. *

Parameters
Name Description
visitor CopyVisitor
data Object
Returns
Type Description
Object

dump(String prefix)

public void dump(String prefix)
Parameter
Name Description
prefix String

getId()

public int getId()
Returns
Type Description
int

jjtAccept(CopyVisitor visitor, Object data)

public Object jjtAccept(CopyVisitor visitor, Object data)

Accept the visitor. *

Parameters
Name Description
visitor CopyVisitor
data Object
Returns
Type Description
Object

jjtAddChild(Node n, int i)

public void jjtAddChild(Node n, int i)

This method tells the node to add its argument to the node's list of children.

Parameters
Name Description
n Node
i int

jjtClose()

public void jjtClose()

This method is called after all the child nodes have been added.

jjtGetChild(int i)

public Node jjtGetChild(int i)

This method returns a child node. The children are numbered from zero, left to right.

Parameter
Name Description
i int
Returns
Type Description
Node

jjtGetNumChildren()

public int jjtGetNumChildren()

Return the number of children the node has.

Returns
Type Description
int

jjtGetParent()

public Node jjtGetParent()
Returns
Type Description
Node

jjtGetValue()

public Object jjtGetValue()
Returns
Type Description
Object

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.

jjtSetParent(Node n)

public void jjtSetParent(Node n)

This pair of methods are used to inform the node of its parent.

Parameter
Name Description
n Node

jjtSetValue(Object value)

public void jjtSetValue(Object value)
Parameter
Name Description
value Object

toString()

public String toString()
Returns
Type Description
String
Overrides

toString(String prefix)

public String toString(String prefix)
Parameter
Name Description
prefix String
Returns
Type Description
String