lojix/search/src/main/com/thesett/aima/search/util/Searches.java
public static <T> Set<T> setOf(SearchMethod<T> method)
    {
        Set<T> result = new HashSet<T>();
        findAll(result, method);

        return result;
    }
public static <T> Set<T> setOf(SearchMethod<T> method)
    {
        Set<T> result = new HashSet<T>();
        findAll(result, method);

        return result;
    }
public static < T > Set < T > setOf ( SearchMethod < T > method ) { Set < T > result = new HashSet < T > ( ) ; findAll ( result , method ) ; return result ; }
Finds the set of all goals of a search.

@param  <T>    The traversable state type of the search.
@param  method The search method to find all goals of.

@return A set of all goals found.
Finds the set of all goals of a search .