code: public static void scanForLeaves(List<RPNode> nodes,RPTree scan) {
          scanForLeaves(nodes,scan.getRoot());
      }
docs: Scan for leaves accumulating
  the nodes in the passed in list
  @param nodes the nodes so far
  @param scan the tree to scan