@Test public void testMatches() { CommentMatcher matcher = new CommentMatches("<!--.*-->"); assertTrue(matcher.isComment("<!-- yep, it's a comment -->")); assertFalse(matcher.isComment("<not a comment>")); }
public boolean isComment(String line) { return pattern.matcher(line).matches(); }
CommentMatches implements CommentMatcher { public boolean isComment(String line) { return pattern.matcher(line).matches(); } }
CommentMatches implements CommentMatcher { public boolean isComment(String line) { return pattern.matcher(line).matches(); } CommentMatches(final String regex); }
CommentMatches implements CommentMatcher { public boolean isComment(String line) { return pattern.matcher(line).matches(); } CommentMatches(final String regex); boolean isComment(String line); }
CommentMatches implements CommentMatcher { public boolean isComment(String line) { return pattern.matcher(line).matches(); } CommentMatches(final String regex); boolean isComment(String line);  }