lojix/search/src/main/com/thesett/aima/search/impl/BaseQueueSearch.java
public T search() throws SearchNotExhaustiveException
    {
        SearchNode<O, T> path = findGoalPath();

        if (path != null)
        {
            return path.getState();
        }
        else
        {
            return null;
        }
    }
public T search() throws SearchNotExhaustiveException
    {
        SearchNode<O, T> path = findGoalPath();

        if (path != null)
        {
            return path.getState();
        }
        else
        {
            return null;
        }
    }
public T search ( ) throws SearchNotExhaustiveException { SearchNode < O , T > path = findGoalPath ( ) ; if ( path != null ) { return path . getState ( ) ; } else { return null ; } }
Perform the search. This can be called multiple times to get successive results where more than one goal can be
found, if the algorithm supports this. In this case it should return null once no more goals can be found.

@return The first state 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.
Perform the search . This can be called multiple times to get successive results where more than one goal can be found if the algorithm supports this . In this case it should return null once no more goals can be found .