Package it.tidalwave.role
Interface Composite.Visitor<T,R>
-
- All Known Implementing Classes:
Composite.VisitorSupport
- Enclosing interface:
- Composite<TYPE,SPECIALIZED_FINDER extends Finder<? extends TYPE>>
public static interface Composite.Visitor<T,R>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 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
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
-
-