biz.hammurapi.util
Class CompositeVisitor

java.lang.Object
  extended by biz.hammurapi.util.CompositeVisitor
All Implemented Interfaces:
PoliteVisitor, Visitor

public class CompositeVisitor
extends java.lang.Object
implements PoliteVisitor

Takes collection of visitors and piggy-backs them. Visitor's unwillingnes to navigate further is ignored.

Version:
$Revision: 1.3 $
Author:
Pavel Vlasov

Constructor Summary
CompositeVisitor(java.util.Collection visitors)
           
 
Method Summary
 void leave(java.lang.Object target)
          Shall be invoked by Visitable at the end of navigation, when all children has already been visited.
 boolean visit(java.lang.Object target)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeVisitor

public CompositeVisitor(java.util.Collection visitors)
Method Detail

visit

public boolean visit(java.lang.Object target)
Specified by:
visit in interface Visitor
Returns:
false if Visitor is not interested in further descending through Visitable structure

leave

public void leave(java.lang.Object target)
Description copied from interface: PoliteVisitor
Shall be invoked by Visitable at the end of navigation, when all children has already been visited.

Specified by:
leave in interface PoliteVisitor


Copyright © 2003 Hammurapi Group. All Rights Reserved.