protected void selectAndAdd(Node node,CssSelector cssSelector,List<Node> result){
  if (node.getNodeType() != Node.NodeType.ELEMENT) {
    return;
  }
  boolean matched=cssSelector.accept(node);
  if (matched) {
    if (result.contains(node)) {
      return;
    }
    result.add(node);
  }
}

protected void selectAndAdd ( Node node , CssSelector cssSelector , List < Node > result ) { if ( node . getNodeType ( ) != Node . NodeType . ELEMENT ) { return ; } boolean matched = cssSelector . accept ( node ) ; if ( matched ) { if ( result . contains ( node ) ) { return ; } result . add ( node ) ; } }
selects single node for single selector and appends it to the results .
