Open main menu

lensowiki β

Changes

Computer Science/61b/Homework/hw4/list/DListNode.java

734 bytes added, 22:04, 26 April 2007
no edit summary
/* DListNode.java */

package list;

/**
* A DListNode is a node in a DList (doubly-linked list).
*/

public class DListNode {

/**
* item references the item stored in the current node.
* prev references the previous node in the DList.
* next references the next node in the DList.
*
* DO NOT CHANGE THE FOLLOWING FIELD DECLARATIONS.
*/

public Object item;
protected DListNode prev;
protected DListNode next;

/**
* DListNode() constructor.
* @param i the item to store in the node.
* @param p the node previous to this node.
* @param n the node following this node.
*/
DListNode(Object i, DListNode p, DListNode n) {
item = i;
prev = p;
next = n;
}
}
1,273
edits