@Test public void basicTest() { SearchMultiplePattern search = new SearchMultiplePattern(Arrays.asList("abc", "def", "app", "cat")); Assert.assertEquals("abc", search.query("fhasjkfhabcqwe")); Assert.assertEquals("def", search.query("fhadefghabcqwe")); Assert.assertEquals("app", search.query("fhappfashabcqwe")); Assert.assertEquals("cat", search.query("fhasjkfhabqwecat")); }
public String query(String text) { return null; }
SearchMultiplePattern { public String query(String text) { return null; } }
SearchMultiplePattern { public String query(String text) { return null; } SearchMultiplePattern(List<String> patterns); }
SearchMultiplePattern { public String query(String text) { return null; } SearchMultiplePattern(List<String> patterns); String query(String text); }
SearchMultiplePattern { public String query(String text) { return null; } SearchMultiplePattern(List<String> patterns); String query(String text);  }