/**
 * A node in a binary search tree.
 */
public class BSTNode
{
  // +--------+--------------------------------------------------
  // | Fields |
  // +--------+

  /**
   * The contents of this node.
   */
  Object contents;

  /**
   * Things smaller than the current element.
   */
  BSTNode left;

  /**
   * Things larger than the current element.
   */
  BSTNode right;

  /**
   * The parent node.
   */
  BSTNode parent;

  // +--------------+--------------------------------------------
  // | Constructors |
  // +--------------+

  /**
   * Create a new node, specifying only the contents.
   */
  public BSTNode(Object contents) {
    this.contents = contents;
    this.parent = null;
    this.left = null;
    this.right = null;
  } // BSTNode(Object)

} // class BSTNode
