Class BreadthFirstSearcher

java.lang.Object
  extended by Searcher
      extended by BreadthFirstSearcher

public class BreadthFirstSearcher
extends Searcher

BreadthFirstSearcher.java - a simple implementation of breadth-first search.


Constructor Summary
BreadthFirstSearcher()
           
 
Method Summary
 java.util.Vector getPath()
           
 boolean search(SearchNode rootNode)
          search - Search for a goal node starting at the given "root" SearchNode, and return whether or not a goal node was found.
 
Methods inherited from class Searcher
getGoalNode, getNodeCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BreadthFirstSearcher

public BreadthFirstSearcher()
Method Detail

getPath

public java.util.Vector getPath()

search

public boolean search(SearchNode rootNode)
Description copied from class: Searcher
search - Search for a goal node starting at the given "root" SearchNode, and return whether or not a goal node was found.

Specified by:
search in class Searcher
Parameters:
rootNode - a SearchNode value - the initial "root" search node
Returns:
a boolean value - whether or not a goal node was found