net.sourceforge.cilib.container.visitor
Class PreOrderVisitorDecorator<E>

java.lang.Object
  extended by net.sourceforge.cilib.container.visitor.Visitor<E>
      extended by net.sourceforge.cilib.container.visitor.PrePostVisitor<E>
          extended by net.sourceforge.cilib.container.visitor.PreOrderVisitorDecorator<E>
Type Parameters:
E - The type

public class PreOrderVisitorDecorator<E>
extends PrePostVisitor<E>

Simple decorator class that wraps the needed Visitor to make it compatible with Pre-Order Traversals in the Containers defined.

Author:
Gary Pampara

Constructor Summary
PreOrderVisitorDecorator(Visitor<E> v)
          Create a visitor that will pre-visit all nodes.
 
Method Summary
 void preVisit(E o)
          Pre-visit the given element.
 
Methods inherited from class net.sourceforge.cilib.container.visitor.PrePostVisitor
postVisit, visit
 
Methods inherited from class net.sourceforge.cilib.container.visitor.Visitor
isDone
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreOrderVisitorDecorator

public PreOrderVisitorDecorator(Visitor<E> v)
Create a visitor that will pre-visit all nodes. Decorates the provided decorator.

Parameters:
v - The Visitor to decorate.
Method Detail

preVisit

public void preVisit(E o)
Pre-visit the given element.

Overrides:
preVisit in class PrePostVisitor<E>
Parameters:
o - The object to pre-visit.


Copyright © 2009 CIRG. All Rights Reserved.