org.gvsig.tools.visitor.impl
Class AbstractVisitable

java.lang.Object
  extended by org.gvsig.tools.visitor.impl.AbstractVisitable
All Implemented Interfaces:
Visitable
Direct Known Subclasses:
AbstractIndexedVisitable

public abstract class AbstractVisitable
extends Object
implements Visitable

Abstract base implementation for Visitable classes.

Author:
2009- César Ordiñana - gvSIG team

Constructor Summary
AbstractVisitable()
           
 
Method Summary
 void accept(Visitor visitor)
          Provides each value of this container to the provided Visitor.
protected abstract  void doAccept(Visitor visitor)
          Provides each value of this container to the provided Visitor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractVisitable

public AbstractVisitable()
Method Detail

accept

public final void accept(Visitor visitor)
                  throws BaseException
Description copied from interface: Visitable
Provides each value of this container to the provided Visitor.

Specified by:
accept in interface Visitable
Parameters:
visitor - the visitor to apply to each value.
Throws:
BaseException - if there is an error while performing the visit

doAccept

protected abstract void doAccept(Visitor visitor)
                          throws VisitCanceledException,
                                 BaseException
Provides each value of this container to the provided Visitor. The VisitCanceledException will be managed by the parent AbstractVisitable class, so simply throw it.

Throws:
VisitCanceledException
BaseException


Copyright © 2004-2011 gvSIG. All Rights Reserved.