goldman.collection
Interface Visitor<T>

All Known Implementing Classes:
AbstractCollection.VisitingIterator

public interface Visitor<T>

Unlike iterators that support external iteration of the internal structure of the collection, a visitor can avoid these disadvantages by turning the design "inside out." Rather than provide an iterator for use by external code, the external code can implement the following Visitor interface.


Method Summary
 void visit(T item)
          Called during traversal with each element of the collection being passed as the parameter.
 

Method Detail

visit

void visit(T item)
           throws Exception
Called during traversal with each element of the collection being passed as the parameter.

Throws:
Exception