From 8923edffdb36b790014ff47301e53f7ede93ea0d Mon Sep 17 00:00:00 2001 From: "Benjamin J. Culkin" Date: Wed, 11 Oct 2017 22:49:16 -0300 Subject: Cleanup more --- base/src/main/java/bjc/utils/funcutils/TreeUtils.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'base/src/main/java/bjc/utils/funcutils/TreeUtils.java') diff --git a/base/src/main/java/bjc/utils/funcutils/TreeUtils.java b/base/src/main/java/bjc/utils/funcutils/TreeUtils.java index dcd5738..3308fb8 100644 --- a/base/src/main/java/bjc/utils/funcutils/TreeUtils.java +++ b/base/src/main/java/bjc/utils/funcutils/TreeUtils.java @@ -28,11 +28,10 @@ public class TreeUtils { return paths; } + /* Find a path in a tree. */ private static void findPath(ITree subtree, LinkedList path, Predicate leafMarker, IList> paths) { if(subtree.getChildrenCount() == 0 && leafMarker.test(subtree.getHead())) { - /* - * We're at a matching leaf node. Add it. - */ + /* We're at a matching leaf node. Add it. */ IList finalPath = new FunctionalList<>(); for(T ePath : path) { @@ -43,9 +42,7 @@ public class TreeUtils { paths.add(finalPath); } else { - /* - * Check the children of this node. - */ + /* Check the children of this node. */ path.add(subtree.getHead()); subtree.doForChildren((child) -> findPath(child, path, leafMarker, paths)); -- cgit v1.2.3