package btree; /** This class describes a node suitable for use in a binary tree. The class uses a generic type parameter to represent the type of data that is stored in each node. */ public class BNode { /** This field contains the address of the left child of this node. It's value is null if the node has no left child. */ public BNode left; /** This field contains the address of the right child of this node. It's value is null if the node has no right child. */ public BNode right; /** This field contains the address of the data that is associated with this node. */ public T data; /** This zero-parameter constructor initializes the two link fields and the data field to null values. */ public BNode() { left = null; right = null; data = null; } /** This one-parameter constructor initializes two link fields to null values and initializes the data field to the value of the parameter. */ public BNode(T value) { left = null; right = null; data = value; } }