package rebelsky.dict; /** * A simple implementation of nodes that fall within a binary * search tree. * * @author Samuel A. Rebelsky * @version 1.0 of November 2004 */ class BSTNode { // +-------+--------------------------------------------------- // | Notes | // +-------+ /* This class is purposefully not public, since it really only gets used by other structures. Because this class's primary intent is to hold data for other structures, it assumes that the other structures modify the fields directly. */ // +--------+-------------------------------------------------- // | Fields | // +--------+ /** * The object stored in this node. */ Object contents; /** * The left subtree. */ BSTNode left; /** * The right subtree. */ BSTNode right; // +--------------+-------------------------------------------- // | Constructors | // +--------------+ /** * Build a new node with no children. */ public BSTNode(Object _contents) { this.contents = _contents; } // BSTNode(Object) } // class BSTNode