|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines generic "callback" methods which are called by the Navigator as a structure is traversed. The Visitor is used to customize the operations performed on nodes in a structure, independent of how the structure is navigated. Classes that implement this interface are expected to perform some operation as each node or level is visited. The Visitor does not have control over how the structure is navigated. However, if a boolean false value is returned, then the Navigator will not traverse that node any further.
Several types of visit methods are defined. In practice, a Visitor implementation would only use one of these methods for its specific purpose. The unused methods can simply return true.
Method Summary | |
boolean |
visit(Persistable fromNode,
Link link,
Persistable toNode,
int level,
boolean previouslyVisited)
Visit a node. |
boolean |
visitLevel(Persistable fromNode,
Vector links,
Vector toNodes,
int level)
Vist nodes at this level. |
boolean |
visitLevel(Vector fromNodes,
Vector links,
Vector toNodes,
int level)
Vist nodes at this level. |
Method Detail |
public boolean visit(Persistable fromNode, Link link, Persistable toNode, int level, boolean previouslyVisited) throws WTException
fromNode
- link
- toNode
- level
- previouslyVisited
-
WTException
public boolean visitLevel(Persistable fromNode, Vector links, Vector toNodes, int level) throws WTException
fromNode
- links
- toNodes
- level
-
WTException
public boolean visitLevel(Vector fromNodes, Vector links, Vector toNodes, int level) throws WTException
fromNodes
- links
- toNodes
- level
-
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |