code: public static <T extends Node> List<T> findNodes(List<Node> nodes, Class<T> cls) {
          List<T> results = new ArrayList<>();
          findNodes(nodes, cls, results);
          return results;
      }
docs: This method recursively scans a node hierarchy to locate instances of a particular
  type.
  
  @param nodes The nodes to scan
  @param cls The class of the node to be returned
  @return The list of nodes found