|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
The PathFinder interface is implemented by classes that provide
a mechanism to find routes between nodes.
A PathFinder is a Runnable so that you can use it
either directly or as a Thread. To use it directly, just call findPath.
This may take a while, so you may want to use it as a Thread. You do this
by constructing the PathFinder, adding yourself as a
PathListener, and then calling the start method. When the path
has been found or all possible paths have been exhausted, a
PathEvent will be sent.
| Method Summary | |
void |
abort()
Abort the current path search. |
void |
addPathListener(PathListener l)
Add a listener for PathEvents. |
java.util.List |
findPath()
Find a path between the start and the goal Nodes. |
java.util.List |
getConsideredPath()
Get the path currently being considered. |
void |
removePathListener(PathListener l)
Remove a listener for PathEvents. |
| Methods inherited from interface java.lang.Runnable |
run |
| Method Detail |
public java.util.List findPath()
public void abort()
public java.util.List getConsideredPath()
public void addPathListener(PathListener l)
l - the listener to add.public void removePathListener(PathListener l)
l - the listener to remove.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||