@Test public void testFilter() throws Exception { Assert.assertFalse(TestUtils.containsNamedField("integerProperty", filtered)); Assert.assertFalse(TestUtils.containsNamedField("booleanProperty", filtered)); Assert.assertTrue(TestUtils.containsNamedField("stringProperty", filtered)); Assert.assertTrue(TestUtils.containsNamedField("doubleProperty", filtered)); Assert.assertTrue(TestUtils.containsNamedField("objectProperty", filtered)); }
public List<Element> filter(List<Element> toFilter) throws FilterException { List<Element> filtered = new ArrayList<Element>(toFilter); for (String name : names) { extractFieldByName(filtered, name); } return filtered; }
ExcludeFilter extends AbstractNameFilter implements ElementListFilter { public List<Element> filter(List<Element> toFilter) throws FilterException { List<Element> filtered = new ArrayList<Element>(toFilter); for (String name : names) { extractFieldByName(filtered, name); } return filtered; } }
ExcludeFilter extends AbstractNameFilter implements ElementListFilter { public List<Element> filter(List<Element> toFilter) throws FilterException { List<Element> filtered = new ArrayList<Element>(toFilter); for (String name : names) { extractFieldByName(filtered, name); } return filtered; } ExcludeFilter(String... names); }
ExcludeFilter extends AbstractNameFilter implements ElementListFilter { public List<Element> filter(List<Element> toFilter) throws FilterException { List<Element> filtered = new ArrayList<Element>(toFilter); for (String name : names) { extractFieldByName(filtered, name); } return filtered; } ExcludeFilter(String... names); List<Element> filter(List<Element> toFilter); String toString(); }
ExcludeFilter extends AbstractNameFilter implements ElementListFilter { public List<Element> filter(List<Element> toFilter) throws FilterException { List<Element> filtered = new ArrayList<Element>(toFilter); for (String name : names) { extractFieldByName(filtered, name); } return filtered; } ExcludeFilter(String... names); List<Element> filter(List<Element> toFilter); String toString();  }