From e68d36aafd8a10fa52ad263045c960747e754b5e Mon Sep 17 00:00:00 2001 From: "Benjamin J. Culkin" Date: Sat, 2 Jun 2018 17:39:54 -0300 Subject: Comment changes Perform various comment tweaks and changes --- base/src/main/java/bjc/utils/data/GeneratingIterator.java | 8 +++++--- base/src/main/java/bjc/utils/data/TopDownTransformIterator.java | 1 + base/src/main/java/bjc/utils/data/Tree.java | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'base/src/main/java/bjc/utils/data') diff --git a/base/src/main/java/bjc/utils/data/GeneratingIterator.java b/base/src/main/java/bjc/utils/data/GeneratingIterator.java index 8e6bcd2..25d2d3d 100644 --- a/base/src/main/java/bjc/utils/data/GeneratingIterator.java +++ b/base/src/main/java/bjc/utils/data/GeneratingIterator.java @@ -45,9 +45,11 @@ public class GeneratingIterator implements Iterator { } /* - * @NOTE As this currently is, it only works correctly assuming that - * next() is only called when hasNext() is true. Should we safeguard - * against people who are not doing the right thing? + * @NOTE + * + * As this currently is, it only works correctly assuming that next() is + * only called when hasNext() is true. Should we safeguard against + * people who are not doing the right thing? */ @Override public E next() { diff --git a/base/src/main/java/bjc/utils/data/TopDownTransformIterator.java b/base/src/main/java/bjc/utils/data/TopDownTransformIterator.java index 9a99a70..f5bc2e6 100644 --- a/base/src/main/java/bjc/utils/data/TopDownTransformIterator.java +++ b/base/src/main/java/bjc/utils/data/TopDownTransformIterator.java @@ -16,6 +16,7 @@ import java.util.function.Function; * Figure out what is broken with this, and fix it so that step-wise * iteration works correctly. */ + /** * An iterative top-down transform of a tree. * diff --git a/base/src/main/java/bjc/utils/data/Tree.java b/base/src/main/java/bjc/utils/data/Tree.java index 77dc390..40ed0f5 100644 --- a/base/src/main/java/bjc/utils/data/Tree.java +++ b/base/src/main/java/bjc/utils/data/Tree.java @@ -29,6 +29,8 @@ public class Tree implements ITree { /* * @NOTE Why have both this boolean and childCount? Why not just do a * childCount == 0 whenever you'd check hasChildren? + * - Because hasChildren is set once and not reset, and really what + * it indicates is that children has been allocated. */ private boolean hasChildren; /* The number of children this node has. */ -- cgit v1.2.3