Class NodeList
java.lang.Object
EDU.purdue.jtb.parser.syntaxtree.NodeList
- All Implemented Interfaces:
INode, INodeList, Serializable
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNodeList()Initializes an empty list of nodes with a default first allocation.NodeList(int sz) Initializes an empty list of nodes with a given allocation.Initializes an empty list of nodes with a given allocation and adds a first node.Initializes an empty list of nodes with a default first allocation and adds a first node. -
Method Summary
Modifier and TypeMethodDescriptionintaccept(IIntVisitor vis) Accepts aIIntVisitorvisitor with user return data.voidaccept(IVoidVisitor vis) Accepts aIVoidVisitorvisitor} visitor with user return data.voidAdds a node to the list of nodes, managing progressive allocation increments.elementAt(int i) Gets the node in the list at a given position.elements()Returns an iterator on the nodes list.intsize()Returns the number of nodes in the list.
-
Field Details
-
nodes
-
-
Constructor Details
-
NodeList
public NodeList()Initializes an empty list of nodes with a default first allocation. -
NodeList
public NodeList(int sz) Initializes an empty list of nodes with a given allocation.- Parameters:
sz- - the list size
-
NodeList
Initializes an empty list of nodes with a default first allocation and adds a first node.- Parameters:
firstNode- - the node to add
-
NodeList
Initializes an empty list of nodes with a given allocation and adds a first node.- Parameters:
sz- - the list sizefirstNode- - the node to add
-
-
Method Details
-
addNode
-
elementAt
-
elements
-
size
-
accept
Accepts aIIntVisitorvisitor with user return data. -
accept
Accepts aIVoidVisitorvisitor} visitor with user return data.
-