通过递归地比较当前节点下的树,该方法可以执行更深一步的比较,或者只是执行停留在当前节点的这种快速比较。
It can perform either a deep comparison that recursively compares the trees below the current node, or a quick comparison that stops at the current node.
设想一个场景,您想要递归地访问一个目录树,在该树中的每个文件及目录上停下来,并为每个查找到的条目调用您自己的回调方法。
Imagine a scenario in which you want to traverse a directory tree recursively, stopping at each file and directory under that tree and having your own callback methods invoked for each entry found.
而且,令人感兴趣的是,DB2返回结果时所依照的顺序暴露了递归如何逐层地而不是采用遍历树的方法进行处理。
Further, it is interesting to note that the order in which DB2 has returned the results exposes how the recursion is processed one level at a time, instead of using a tree-walk.
应用推荐