|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.tidalwave.role.Composite.VisitorSupport<T,R>
public static class Composite.VisitorSupport<T,R>
A support class for Composite.Visitor
which provides default empty methods.
Constructor Summary | |
---|---|
Composite.VisitorSupport()
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Composite.VisitorSupport()
Method Detail |
---|
public void preVisit(@Nonnull T object)
preVisit
in interface Composite.Visitor<T,R>
object
- the visited objectpublic void visit(@Nonnull T object)
#preVisit()
, it makes sense to implement
it when you don't need to distinguish between pre-order and post-order traversal.
visit
in interface Composite.Visitor<T,R>
object
- the visited objectpublic void postVisit(@Nonnull T object)
postVisit
in interface Composite.Visitor<T,R>
object
- the visited object@Nonnull public R getValue() throws NotFoundException
getValue
in interface Composite.Visitor<T,R>
NotFoundException
- when no value has been found
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |