Cover Data Structures and Algorithms with Object-Oriented Design Patterns in Java
next up previous contents index

Abstract Visitors

Program gif defines an abstract class called AbstractVisitor that implements the Visitor interface. This class is provided simply as a convenience. It provides a default implementation for the visit method which does nothing and a default implementation for the isDone method which always returns false.

   program4676
Program: AbstractVisitor class.


next up previous contents index

Bruno Copyright © 1998 by Bruno R. Preiss, P.Eng. All rights reserved.