|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.visitor.CompositeVisitor
This class provides a mechanism for supporting more than one Visitor
object that can be visited during a single traversal. This class contains
a Vector of Visitor objects that can be added to or removed from. It
implements the visit methods by calling the corresponding visit methods
in each of the contained Visitor objects and returning the logical OR
of their return values.
Supported API: true
Extendable: true
Field Summary | |
private static String |
CLASSNAME
|
private static String |
RESOURCE
|
private Vector |
visitors
|
Constructor Summary | |
CompositeVisitor()
|
Method Summary | |
void |
addVisitor(Visitor a_visitor)
Adds a Visitor instance to the contained list of Visitors. |
protected Vector |
getVisitors()
|
void |
removeVisitor(Visitor a_visitor)
Removes the Visitor instance from the contained list of Visitors. |
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. |
private Vector |
visitors()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private Vector visitors
Constructor Detail |
public CompositeVisitor()
Method Detail |
public void addVisitor(Visitor a_visitor)
a_visitor
- public void removeVisitor(Visitor a_visitor)
a_visitor
- public boolean visit(Persistable fromNode, Link link, Persistable toNode, int level, boolean previouslyVisited) throws WTException
visit
in interface Visitor
fromNode
- link
- toNode
- level
- previouslyVisited
-
WTException
public boolean visitLevel(Persistable fromNode, Vector links, Vector toNodes, int level) throws WTException
visitLevel
in interface Visitor
fromNode
- links
- toNodes
- level
-
WTException
public boolean visitLevel(Vector fromNodes, Vector links, Vector toNodes, int level) throws WTException
visitLevel
in interface Visitor
fromNodes
- links
- toNodes
- level
-
WTException
private Vector visitors()
protected Vector getVisitors()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |