net.sf.tacos.components.tree
Class TreeIterator

java.lang.Object
  extended by net.sf.tacos.components.tree.TreeIterator
All Implemented Interfaces:
Iterator

public abstract class TreeIterator
extends Object
implements Iterator

Author:
phraktle

Constructor Summary
TreeIterator(Collection rootElements)
          Tree iterator
TreeIterator(Object rootElement)
          New tree
 
Method Summary
protected abstract  Collection getChildren(Object node)
          Gets children
 int getDepth()
          Depth
 int getPreviousDepth()
          Previous depth
 boolean hasNext()
          
 Object next()
          
 void remove()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeIterator

public TreeIterator(Object rootElement)
New tree

Parameters:
rootElement -

TreeIterator

public TreeIterator(Collection rootElements)
Tree iterator

Parameters:
rootElements -
Method Detail

getDepth

public int getDepth()
Depth

Returns:

getPreviousDepth

public int getPreviousDepth()
Previous depth

Returns:

hasNext

public boolean hasNext()

Specified by:
hasNext in interface Iterator

next

public Object next()

Specified by:
next in interface Iterator

getChildren

protected abstract Collection getChildren(Object node)
Gets children

Parameters:
node -
Returns:

remove

public void remove()

Specified by:
remove in interface Iterator


Copyright © 2006-2007 SourceForge.net. All Rights Reserved.