public static class TreeUtilities.PreorderModelEnumeration extends Object implements Enumeration
Modifier and Type | Field and Description |
---|---|
protected TreeModel |
model |
private TreePath |
path |
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() |
private void |
pushNodeAsEnumeration(Object node) |
private void |
updateSubtree() |
protected Deque<Enumeration> stack
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
private void updateSubtree()
private void pushNodeAsEnumeration(Object node)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses