package taojava.util; /** * Simple nodes for linked structures. */ public class Node { // +--------+---------------------------------------------------------- // | Fields | // +--------+ /** * The value stored in the ndoe. */ T val; /** * The next node. */ Node next; // +--------------+---------------------------------------------------- // | Constructors | // +--------------+ /** * Create a new node that contains val and that links to * next. */ public Node(T val, Node next) { this.val = val; this.next = next; } // Node(T, Node) } // class Node