lojix/search/src/main/com/thesett/aima/search/impl/BaseQueueSearch.java
public SearchNode<O, T> findGoalPath() throws SearchNotExhaustiveException
    {
        // Delegate the search to the pluggable search algorithm.
        return searchAlgorithm.search(this, startStates, maxSteps, searchSteps);
    }
public SearchNode<O, T> findGoalPath() throws SearchNotExhaustiveException
    {
        // Delegate the search to the pluggable search algorithm.
        return searchAlgorithm.search(this, startStates, maxSteps, searchSteps);
    }
public SearchNode < O , T > findGoalPath ( ) throws SearchNotExhaustiveException { // Delegate the search to the pluggable search algorithm. return searchAlgorithm . search ( this , startStates , maxSteps , searchSteps ) ; }
Implementation of the general queue search. The basic algorithm is simple: take the next element from the queue
and goal test it. If it is a goal then return it and stop the search. If it is not a goal then expand its
successor states and enqueue them and then repeat the procedure.

@return The first {@link SearchNode} corresponding to a goal state that is found or null if none can be found
after exhaustive searching. A return value of null should really mean that exhaustive searching has been
completed rather than some premature termination condition being reached. See the comment below about the
SearchNotExhaustiveException.

@throws SearchNotExhaustiveException If the search stops before finding a solution or exhausting the search
space. Different search algorithms may fail for different reasons but in
particular it it is worth noting that if the maximum number of steps is
reached without exhausting the search space this will cause an exception to
be thrown rather than for this method to return null.
Implementation of the general queue search . The basic algorithm is simple : take the next element from the queue and goal test it . If it is a goal then return it and stop the search . If it is not a goal then expand its successor states and enqueue them and then repeat the procedure .