public List<HtmlComponent> getChildren(Predicate predicate) { List<HtmlComponent> results = new ArrayList<HtmlComponent>();  for (HtmlComponent child : getChildren()) { if (predicate.evaluate(child)) { results.add(child); }  results.addAll(child.getChildren(predicate)); }  return results;
public List<HtmlComponent> getChildren() { return new ArrayList<HtmlComponent>();
    public List<HtmlComponent> getChildren(Predicate predicate) {        List<HtmlComponent> results = new ArrayList<HtmlComponent>();                for (HtmlComponent child : getChildren()) {            if (predicate.evaluate(child)) {                results.add(child);            }            results.addAll(child.getChildren(predicate));        }                return results;    }