/** * Store the search results. */ private static void storeResults(String testConfig, long stopTime, List<List<SearchResults>> listOfListOfSearchResults) { // Print the number of times each phrase matched the input. mResultsMap.put(stopTime, "The search returned = " // Count the number of matches. + listOfListOfSearchResults.stream() .mapToInt(list -> list.stream().mapToInt(SearchResults::size).sum()) .sum() + " phrase matches in " + stopTime + " milliseconds for " + testConfig); // Print the matching titles. if (Options.getInstance().isVerbose()) printTitles(listOfListOfSearchResults); }
/** * Store the search results. */ private static void storeResults(String testConfig, long stopTime, List<List<SearchResults>> listOfListOfSearchResults) { // Print the number of times each phrase matched the input. mResultsMap.put(stopTime, "The search returned = " // Count the number of matches. + listOfListOfSearchResults.stream() .mapToInt(list -> list.stream().mapToInt(SearchResults::size).sum()) .sum() + " phrase matches in " + stopTime + " milliseconds for " + testConfig); // Print the matching titles. if (Options.getInstance().isVerbose()) printTitles(listOfListOfSearchResults); }
/** * Store the search results. */ private static void storeResults(String testName, long stopTime, List<List<SearchResults>> listOfListOfSearchResults) { // Print the number of times each phrase matched the input. mResultsMap.put(stopTime, "The search returned = " // Count the number of matches. + listOfListOfSearchResults.stream() .mapToInt(list -> list.stream().mapToInt(SearchResults::size).sum()) .sum() + " phrase matches for " + mInputList.size() + " input strings in " + stopTime + " milliseconds for " + testName); // Print the matching titles. if (Options.getInstance().isVerbose()) printTitles(listOfListOfSearchResults); }