From 41e85b1493a9253f11aefd179d14c3c01a7c9287 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Sun, 21 Feb 2016 15:41:14 -0500 Subject: Commenting of various things --- .../main/java/bjc/utils/funcdata/bst/TreeNode.java | 30 ++++++++++++++++------ 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/funcdata/bst/TreeNode.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/funcdata/bst/TreeNode.java b/BJC-Utils2/src/main/java/bjc/utils/funcdata/bst/TreeNode.java index 65eb546..40cc53f 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/funcdata/bst/TreeNode.java +++ b/BJC-Utils2/src/main/java/bjc/utils/funcdata/bst/TreeNode.java @@ -9,19 +9,32 @@ import java.util.function.Predicate; /** * A binary node in a tree. + * * @author ben * - * @param The data type stored in the tree. + * @param + * The data type stored in the tree. */ public class TreeNode extends TreeLeaf { + /** + * The left child of this node + */ private ITreePart left; + + /** + * The right child of this node + */ private ITreePart right; /** * Create a new node with the specified data and children. - * @param data The data to store in this node. - * @param left The left child of this node. - * @param right The right child of this node. + * + * @param data + * The data to store in this node. + * @param left + * The left child of this node. + * @param right + * The right child of this node. */ public TreeNode(T data, ITreePart left, ITreePart right) { super(data); @@ -30,9 +43,10 @@ public class TreeNode extends TreeLeaf { } /* - * Either adds it to the left/right, or undeletes itself. - * (non-Javadoc) - * @see bjc.utils.data.bst.TreeLeaf#add(java.lang.Object, java.util.Comparator) + * Either adds it to the left/right, or undeletes itself. (non-Javadoc) + * + * @see bjc.utils.data.bst.TreeLeaf#add(java.lang.Object, + * java.util.Comparator) */ @Override public void add(T dat, Comparator comp) { @@ -71,7 +85,7 @@ public class TreeNode extends TreeLeaf { return bf.apply(tm, left.collapse(f, bf)); } } else { - if(right != null) { + if (right != null) { return bf.apply(tm, right.collapse(f, bf)); } else { return tm; -- cgit v1.2.3