Package it.tidalwave.role
Interface Composite.Visitor<T,R>
- Type Parameters:
T
- the type of the compositeR
- the type of the result
public static interface Composite.Visitor<T,R>
A visitor that can travel through the
Composite
items.-
Method Summary
-
Method Details
-
preVisit
Visits an object. This method is called before visiting children (pre-order).- Parameters:
object
- the visited object
-
visit
Visits an object. This method is actually called just afterpreVisit(Object)
, 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
Visits an object. This method is called after visiting children (post-order).- Parameters:
object
- the visited object
-
getValue
Returns the value of this visitor..- Returns:
- the value of this visitor
-