|
JTP API Documentation | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jtp.frame.vc.GraphWalker
GraphWalker.java This class walks through the graph of ValueCollections connected with ValueLinks. It keeps a set of visited nodes, preventing cycles. Created: Mon Mar 15 03:18:49 1999
Field Summary | |
protected Set |
history
The set of visited nodes. |
protected boolean |
isNew
Set to true if we have just arrived to a node, and it hasn't yet been returned by next(). |
protected LinkedList |
links
This is another representation of the path from the starting point of the search to the current node. |
protected LinkedList |
path
The stack of Iterators corresponding to the path from the starting point of the search to the current node. |
Constructor Summary | |
GraphWalker()
|
Method Summary | |
protected abstract Object |
getCurrent()
|
LinkedList |
getLinkChain()
|
protected abstract boolean |
goDown(Object o)
|
boolean |
hasNext()
|
Object |
next()
|
void |
remove()
|
void |
reset()
resets this GraphWalker: clears history, path and links; sets isNew to false. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Set history
protected LinkedList path
Iterator
of edges leading from the corresponding
node that have not yet been taken.
protected LinkedList links
protected boolean isNew
Constructor Detail |
public GraphWalker()
Method Detail |
public void reset()
public boolean hasNext()
hasNext
in interface Iterator
public Object next()
next
in interface Iterator
public void remove()
remove
in interface Iterator
public LinkedList getLinkChain()
protected abstract boolean goDown(Object o)
protected abstract Object getCurrent()
|
JTP API Documentation | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |