|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.cuspy.pathfinder.AbstractPathFinder
Basic functionality of path finders.
| Field Summary | |
protected boolean |
aborted
|
protected java.util.Collection |
goals
|
protected java.util.List |
listeners
|
protected Node |
start
|
| Constructor Summary | |
AbstractPathFinder(Node start,
java.util.Collection goals)
Create a new PathFinder. |
|
AbstractPathFinder(Node start,
Node goal)
Create a new PathFinder. |
|
| Method Summary | |
void |
abort()
Abort the current path search. |
void |
addPathListener(PathListener l)
Add a listener for PathEvents. |
protected void |
fireConsidered()
|
void |
removePathListener(PathListener l)
Remove a listener for PathEvents. |
void |
run()
Execute the path finding algorithm. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.cuspy.pathfinder.PathFinder |
findPath, getConsideredPath |
| Field Detail |
protected Node start
protected java.util.Collection goals
protected java.util.List listeners
protected boolean aborted
| Constructor Detail |
public AbstractPathFinder(Node start,
Node goal)
start - the Node to start with.goal - the Node to end at.
public AbstractPathFinder(Node start,
java.util.Collection goals)
start - the Node to start with.goals - a Collection of Nodes to end at.| Method Detail |
public void abort()
PathFinder
abort in interface PathFinderpublic void run()
run in interface java.lang.Runnableprotected void fireConsidered()
public void addPathListener(PathListener l)
PathFinder
addPathListener in interface PathFinderl - the listener to add.public void removePathListener(PathListener l)
PathFinder
removePathListener in interface PathFinderl - the listener to remove.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||