public static class TreeUtilities.PreorderModelEnumeration extends Object implements Enumeration
Modifier and Type | Field and Description |
---|---|
protected TreeModel |
model |
protected Deque<Enumeration> |
stack |
Constructor and Description |
---|
PreorderModelEnumeration(TreeModel model)
Instantiates a preorder traversal starting from the root of the
TreeModel.
|
PreorderModelEnumeration(TreeModel model,
Object node)
Instantiates a preorder traversal of the TreeModel which
starts at the given node.
|
PreorderModelEnumeration(TreeModel model,
TreePath path)
Instantiates a preorder traversal of the TreeModel which starts at the
last path component of the given TreePath.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasMoreElements() |
Object |
nextElement() |
protected Deque<Enumeration> stack
protected TreeModel model
public PreorderModelEnumeration(TreeModel model)
model
- the TreeModel to travers.public PreorderModelEnumeration(TreeModel model, Object node)
model
- the TreeModel to travers.node
- the node to startpublic PreorderModelEnumeration(TreeModel model, TreePath path)
model
- the TreeModel to travers.path
- the TreePath to start frompublic boolean hasMoreElements()
hasMoreElements
in interface Enumeration
public Object nextElement()
nextElement
in interface Enumeration
Copyright © 2015. All rights reserved.