de.rwth.utils
Interface TreeIteratorTraversal.Actions

All Known Implementing Classes:
AbstractTreeIteratorTraversalActions
Enclosing class:
TreeIteratorTraversal

public static interface TreeIteratorTraversal.Actions

The inner interface Actions describes how a TreeTraversal should act during the traversal.


Method Summary
 void atEntry(TreeIterator ti)
          Called once at the beginning of the traversal, before visiting the first entry in the tree.
 void atExit(TreeIterator ti)
          Called once at the end of the traversal, after visiting the last entry in the tree.
 void atLeaf(TreeIterator ti)
          Called once at each leaf entry, after calling atNext or atRight for this node.
 void atLeft(TreeIterator ti)
          Called always after executing left on the TreeIterator.
 void atNext(TreeIterator ti)
          Called always after executing next on the TreeIterator.
 void atPrevious(TreeIterator ti)
          Called always after executing previous on the TreeIterator.
 void atRight(TreeIterator ti)
          Called always after executing right on the TreeIterator.
 void atRoot(TreeIterator ti)
          Called once at the root entry, before calling atNext for this node.
 

Method Detail

atEntry

public void atEntry(TreeIterator ti)
Called once at the beginning of the traversal, before visiting the first entry in the tree.
Parameters:
ti - the TreeIterator being traversed, with 'ti.current()' returning the current entry

atExit

public void atExit(TreeIterator ti)
Called once at the end of the traversal, after visiting the last entry in the tree.
Parameters:
ti - the TreeIterator being traversed, with 'ti.current()' returning the current entry

atRoot

public void atRoot(TreeIterator ti)
Called once at the root entry, before calling atNext for this node.
Parameters:
ti - the TreeIterator being traversed, with 'ti.current()' returning the current entry

atLeaf

public void atLeaf(TreeIterator ti)
Called once at each leaf entry, after calling atNext or atRight for this node.
Parameters:
ti - the TreeIterator being traversed, with 'ti.current()' returning the current entry

atNext

public void atNext(TreeIterator ti)
Called always after executing next on the TreeIterator.
Parameters:
ti - the TreeIterator being traversed, with 'ti.current()' returning the current entry

atPrevious

public void atPrevious(TreeIterator ti)
Called always after executing previous on the TreeIterator.
Parameters:
ti - the TreeIterator being traversed, with 'ti.current()' returning the current entry

atLeft

public void atLeft(TreeIterator ti)
Called always after executing left on the TreeIterator.
Parameters:
ti - the TreeIterator being traversed, with 'ti.current()' returning the current entry

atRight

public void atRight(TreeIterator ti)
Called always after executing right on the TreeIterator.
Parameters:
ti - the TreeIterator being traversed, with 'ti.current()' returning the current entry