match words final

This commit is contained in:
mherbaghinyan 2019-01-09 16:18:32 +04:00
parent 1861e9b94c
commit d413ec768f
1 changed files with 3 additions and 3 deletions

View File

@ -14,13 +14,13 @@ public class MatchWords {
String[] items = {"hello", "Baeldung"}; String[] items = {"hello", "Baeldung"};
String inputString = "hello there, Baeldung"; String inputString = "hello there, Baeldung";
//System.out.println(containsWords(inputString, items)); System.out.println(containsWords(inputString, items));
System.out.println(java8(new ArrayList<>(Arrays.asList(inputString.split(" "))), new ArrayList<>(Arrays.asList(items)))); System.out.println(java8(new ArrayList<>(Arrays.asList(inputString.split(" "))), new ArrayList<>(Arrays.asList(items))));
//System.out.println(patternMatch(inputString)); System.out.println(patternMatch(inputString));
//ahoCorasick(); ahoCorasick();
} }
private static boolean containsWords(String inputString, String[] items) { private static boolean containsWords(String inputString, String[] items) {