List<Element> (String name, Namespace ns) { ElementFilter predicate = new ElementFilter(name, ns); return Arrays.stream(myContent) .filter(predicate::matches) .map(it -> (Element)it) .collect(Collectors.toList()); }