Joda System API

org.joda.util
Interface TreeIterator

All Superinterfaces:
java.util.Iterator
All Known Implementing Classes:
ArrayTreeNode.DepthFirstTreeIterator

public interface TreeIterator
extends java.util.Iterator

TreeIterator adds to an iterator by allowing access to the parent of each node during the iteration.

Author:
Stephen Colebourne

Method Summary
 TreeNode getParent()
          Get the parent of the last returned node
 TreeNode nextNode()
          Get the next node, typecast to a TreeNode
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Method Detail

nextNode

public TreeNode nextNode()
Get the next node, typecast to a TreeNode

Returns:
as per next() but typecast

getParent

public TreeNode getParent()
Get the parent of the last returned node

Returns:
the object that is the parent of the last retrned node

Joda System API

Copyright © 2001-2003 Stephen Colebourne. All Rights Reserved.