private static < T > void findAll ( Collection < T > result , SearchMethod < T > method ) { for ( Iterator < T > i = allSolutions ( method ) ; i . hasNext ( ) ; ) { T nextSoltn = i . next ( ) ; result . add ( nextSoltn ) ; } }
Finals all solutions to a search and inserts them into the specified collection .