@Test public void testFilterMultipleNames() { NodeNameInFilter filter = new NodeNameInFilter("a.**", "b.*", "c.*"); assertThat(filter.isAccepted(new Node("a.Clazz")), is(true)); assertThat(filter.isAccepted(new Node("b.Clazz")), is(true)); assertThat(filter.isAccepted(new Node("c.Clazz")), is(true)); assertThat(filter.isAccepted(new Node("a.my.Clazz")), is(true)); assertThat(filter.isAccepted(new Node("other.Clazz")), is(false)); }
@Override public boolean isAccepted(Node node) { return wildcards.stream().anyMatch(p -> nameMatcher.matches(p, node.getName())); }
NodeNameInFilter implements NodeFilter { @Override public boolean isAccepted(Node node) { return wildcards.stream().anyMatch(p -> nameMatcher.matches(p, node.getName())); } }
NodeNameInFilter implements NodeFilter { @Override public boolean isAccepted(Node node) { return wildcards.stream().anyMatch(p -> nameMatcher.matches(p, node.getName())); } NodeNameInFilter(String... patterns); }
NodeNameInFilter implements NodeFilter { @Override public boolean isAccepted(Node node) { return wildcards.stream().anyMatch(p -> nameMatcher.matches(p, node.getName())); } NodeNameInFilter(String... patterns); final NodeNameInFilter addFilter(String... patterns); @Override boolean isAccepted(Node node); }
NodeNameInFilter implements NodeFilter { @Override public boolean isAccepted(Node node) { return wildcards.stream().anyMatch(p -> nameMatcher.matches(p, node.getName())); } NodeNameInFilter(String... patterns); final NodeNameInFilter addFilter(String... patterns); @Override boolean isAccepted(Node node);  }