diff options
| author | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2018-06-02 17:39:54 -0300 |
|---|---|---|
| committer | Benjamin J. Culkin <bjculkin@mix.wvu.edu> | 2018-06-02 17:39:54 -0300 |
| commit | e68d36aafd8a10fa52ad263045c960747e754b5e (patch) | |
| tree | 1e9060f03dd59b9338545e0b5bef0a7a8f2f5616 /base/src/main/java/bjc/utils/data | |
| parent | d7bae4d2145d8337570fec03974272d49ba5269d (diff) | |
Comment changes
Perform various comment tweaks and changes
Diffstat (limited to 'base/src/main/java/bjc/utils/data')
| -rw-r--r-- | base/src/main/java/bjc/utils/data/GeneratingIterator.java | 8 | ||||
| -rw-r--r-- | base/src/main/java/bjc/utils/data/TopDownTransformIterator.java | 1 | ||||
| -rw-r--r-- | base/src/main/java/bjc/utils/data/Tree.java | 2 |
3 files changed, 8 insertions, 3 deletions
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<E> implements Iterator<E> { } /* - * @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<ContainedType> implements ITree<ContainedType> { /* * @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. */ |
