it.tidalwave.role
Interface Composite.Visitor<T,R>

Package class diagram package Composite.Visitor
All Known Implementing Classes:
Composite.VisitorSupport
Enclosing interface:
Composite<Type,SpecializedFinder extends Finder<Type>>

public static interface Composite.Visitor<T,R>


Method Summary
 R getValue()
          Returns the value of this visitor.
 void postVisit(T object)
          Visits an object.
 void preVisit(T object)
          Visits an object.
 void visit(T object)
          Visits an object.
 

Method Detail

preVisit

void preVisit(@Nonnull
              T object)
Visits an object. This method is called before visiting children (pre-order).

Parameters:
object - the visited object

visit

void visit(@Nonnull
           T object)
Visits an object. This method is actually called just after #preVisit(), it makes sense to implement it when you don't need to distinguish between pre-order and post-order traversal.

Parameters:
object - the visited object

postVisit

void postVisit(@Nonnull
               T object)
Visits an object. This method is called after visiting children (post-order).

Parameters:
object - the visited object

getValue

@Nonnull
R getValue()
           throws NotFoundException
Returns the value of this visitor.

Returns:
the value
Throws:
NotFoundException - when no value has been found


Copyright © 2009-2012 Tidalwave s.a.s.. All Rights Reserved.