@Test public void testBMatchesList() { String textString = "gcatcgcagagagtatacagtacg"; List<String> pattern = Arrays.asList("g", "a", "g"); List<String> text = Arrays.asList(textString.split("(?!^)")); ListMatch<String> matcher = new BoyerMooreHorspoolMatch<>(pattern); for (int i : matcher.matches(text)) { assertTrue(textString.substring(i).startsWith("gag")); } }
public abstract List<Integer> matches(List<T> text);
ListMatch { public abstract List<Integer> matches(List<T> text); }
ListMatch { public abstract List<Integer> matches(List<T> text); ListMatch(List<T> pattern); }
ListMatch { public abstract List<Integer> matches(List<T> text); ListMatch(List<T> pattern); abstract List<Integer> matches(List<T> text); static ListMatch<T> getMatcher(List<T> pattern); }
ListMatch { public abstract List<Integer> matches(List<T> text); ListMatch(List<T> pattern); abstract List<Integer> matches(List<T> text); static ListMatch<T> getMatcher(List<T> pattern);  }