public class ASTNodeIterator extends Object
children
array never contains a null
reference.Modifier and Type | Field and Description |
---|---|
ASTNode[] |
children
The nodes iterated through by this iterator.
|
protected int |
index
Index into the
children array. |
Constructor and Description |
---|
ASTNodeIterator()
Initializes
index , but not children . |
ASTNodeIterator(int l)
The
children array will have the specified length. |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Determines whether there are any child nodes left to be accessed.
|
ASTNode |
next()
Returns the next child AST node.
|
void |
reset()
Restarts the iterator.
|
public ASTNode[] children
protected int index
children
array.public ASTNodeIterator()
index
, but not children
.public ASTNodeIterator(int l)
children
array will have the specified length.l
- The number of children to iterate through.public boolean hasNext()
true
iff there are child nodes remaining.public ASTNode next()
public void reset()
Copyright © 2016. All rights reserved.