From d43ac54c32bf43b1ef0498e68334adaa13bf5a0e Mon Sep 17 00:00:00 2001 From: Michael Lee <michael.lee.0x2a@gmail.com> Date: Mon, 25 Jan 2016 22:51:06 -0800 Subject: [PATCH] Fix docs + tweak misleading comment in BST --- src/cse332/datastructures/trees/BinarySearchTree.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cse332/datastructures/trees/BinarySearchTree.java b/src/cse332/datastructures/trees/BinarySearchTree.java index 947e233..701a563 100644 --- a/src/cse332/datastructures/trees/BinarySearchTree.java +++ b/src/cse332/datastructures/trees/BinarySearchTree.java @@ -37,7 +37,9 @@ public class BinarySearchTree<K extends Comparable<K>, V> /** * Create a new data node and increment the enclosing tree's size. * - * @param data + * @param key + * key with which the specified value is to be associated + * @param value * data element to be stored at this node. */ @SuppressWarnings("unchecked") @@ -71,7 +73,7 @@ public class BinarySearchTree<K extends Comparable<K>, V> } } - // If value is null, we need to actually add in the new value + // If value is not null, we need to actually add in the new value if (value != null) { current = new BSTNode(key, value); if (this.root == null) { -- GitLab