Loading src/edu/bu/ec504/hw2/BST.java +6 −6 Original line number Diff line number Diff line Loading @@ -51,13 +51,13 @@ public class BST<keyType extends Comparable<keyType> > { // ... getters public final Integer getNodeId() { return nodeId; } public final keyType getKey() { return key; } public final BST<keyType> getLeft() { return left; } public final BST<keyType> getRight() { return right; } public BST<keyType> getLeft() { return left; } public BST<keyType> getRight() { return right; } // ... setters public final void setNodeID(Integer newId) { nodeId=newId; } public final void setLeft(BST<keyType> newLeft) { left=newLeft; } public final void setRight(BST<keyType> newRight) { left=newRight; } public void setLeft(BST<keyType> newLeft) { left=newLeft; } public void setRight(BST<keyType> newRight) { left=newRight; } /** * Compute how to transform this BST into the BST {@code otherTree} using rotations. Loading Loading @@ -86,7 +86,7 @@ public class BST<keyType extends Comparable<keyType> > { * * @param newKey The new key to be inserted */ final public void insert(keyType newKey) { public void insert(keyType newKey) { if (key == null) // insert here key = newKey; else if (newKey.compareTo(key) > 0) { // i.e. newKey > key Loading @@ -105,7 +105,7 @@ public class BST<keyType extends Comparable<keyType> > { /** * Return the BST rooted at this node as a human-readable string */ final public String toString() { public String toString() { return toString("|"); } Loading Loading
src/edu/bu/ec504/hw2/BST.java +6 −6 Original line number Diff line number Diff line Loading @@ -51,13 +51,13 @@ public class BST<keyType extends Comparable<keyType> > { // ... getters public final Integer getNodeId() { return nodeId; } public final keyType getKey() { return key; } public final BST<keyType> getLeft() { return left; } public final BST<keyType> getRight() { return right; } public BST<keyType> getLeft() { return left; } public BST<keyType> getRight() { return right; } // ... setters public final void setNodeID(Integer newId) { nodeId=newId; } public final void setLeft(BST<keyType> newLeft) { left=newLeft; } public final void setRight(BST<keyType> newRight) { left=newRight; } public void setLeft(BST<keyType> newLeft) { left=newLeft; } public void setRight(BST<keyType> newRight) { left=newRight; } /** * Compute how to transform this BST into the BST {@code otherTree} using rotations. Loading Loading @@ -86,7 +86,7 @@ public class BST<keyType extends Comparable<keyType> > { * * @param newKey The new key to be inserted */ final public void insert(keyType newKey) { public void insert(keyType newKey) { if (key == null) // insert here key = newKey; else if (newKey.compareTo(key) > 0) { // i.e. newKey > key Loading @@ -105,7 +105,7 @@ public class BST<keyType extends Comparable<keyType> > { /** * Return the BST rooted at this node as a human-readable string */ final public String toString() { public String toString() { return toString("|"); } Loading