package dataStructures1112; import java.io.Serializable; class DListNode implements Serializable { static final long serialVersionUID = 0L; // Element stored in the node. private E element; // (Pointer to) the previous node. private DListNode previous; // (Pointer to) the next node. private DListNode next; public DListNode( E theElement, DListNode thePrevious, DListNode theNext ) { element = theElement; previous = thePrevious; next = theNext; } public DListNode( E theElement ) { this(theElement, null, null); } public E getElement( ) { return element; } public DListNode getPrevious( ) { return previous; } public DListNode getNext( ) { return next; } public void setElement( E newElement ) { element = newElement; } public void setPrevious( DListNode newPrevious ) { previous = newPrevious; } public void setNext( DListNode newNext ) { next = newNext; } }