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 .