@Test public void testMatch() { RegexpMatcher m = new RegexpMatcher("reg[e]+x", true); assertEquals(LineMatcher.NOT_MATCHED, m.match("regx")); assertEquals(LineMatcher.MATCHED, m.match("regeex")); m = new RegexpMatcher("Reg[e]+x", false); assertEquals(LineMatcher.NOT_MATCHED, m.match("regex")); assertEquals(LineMatcher.MATCHED, m.match("Regex")); }
@Override public int match(String line) { return (termRegexp != null && termRegexp.matcher(line).matches()) ? MATCHED : NOT_MATCHED; }
RegexpMatcher extends LineMatcher { @Override public int match(String line) { return (termRegexp != null && termRegexp.matcher(line).matches()) ? MATCHED : NOT_MATCHED; } }
RegexpMatcher extends LineMatcher { @Override public int match(String line) { return (termRegexp != null && termRegexp.matcher(line).matches()) ? MATCHED : NOT_MATCHED; } RegexpMatcher(String term, boolean caseInsensitive); }
RegexpMatcher extends LineMatcher { @Override public int match(String line) { return (termRegexp != null && termRegexp.matcher(line).matches()) ? MATCHED : NOT_MATCHED; } RegexpMatcher(String term, boolean caseInsensitive); @Override int match(String line); }
RegexpMatcher extends LineMatcher { @Override public int match(String line) { return (termRegexp != null && termRegexp.matcher(line).matches()) ? MATCHED : NOT_MATCHED; } RegexpMatcher(String term, boolean caseInsensitive); @Override int match(String line);  }