//---------------------------------------------------------------------------- // BSTNode.java by Dale/Joyce/Weems Chapter 8 // // Implements Comparable nodes for a binary search tree. // // ajg version: format, protected-->private //---------------------------------------------------------------------------- package support; // Used to hold references to BST nodes for the linked implementation public class BSTNode> { private T info; // The info in a BST node private BSTNode left = null; // A link to the left child node private BSTNode right = null; // A link to the right child node public BSTNode(T info) { this.info = info; } public T getInfo() { return info; } public void setInfo(T info) { this.info = info; } public BSTNode getLeft() { return left; } public void setLeft(BSTNode link) { left = link; } public BSTNode getRight() { return right; } public void setRight(BSTNode link) { right = link; } } // Local Variables: // compile-command: "cd ..; javac support/BSTNode.java" // End: