package dll; /** * Nodes used to build doubly-linked lists. In Saul's words, "These are * really structures." * * @author Samuel A. Rebelsky * @author CSC153 2004S (Except for those who blew off class today) */ class DoublyLinkedNode implements Position { /** * The contents of the node. Should never be null. */ Object contents; /** * The next node in the list. Should be null for the last * element of the list. */ DoublyLinkedNode next; /** * The previous node in the list. Should be null for the first * element of the list. */ DoublyLinkedNode next; /** * Build a new node. */ public DoublyLinkedNode(Object contents) { this.contents = contents; this.next = null; this.prev = null; } // DoublyLinkedNode(Object) } // class DoublyLinkedNode