
/**
 * Node holds object data of a specific
 * object and holds a reference to the next object
 * in the queue.
 * 
 * @author Michael Rivers 
 * @version 1.0
 */
public class Node
{
    private Object data; // holds data in the queue
    private Node next; // points to the next Node in the queue

    /**
     * Constructor for objects of class Node sets parameters to null
     */
    public Node()
    {
       data = null;
       next = null;
    }

    /**
     * Second constructor lets user set the data parameter upon creation
     */
    public Node(Object data)
    {
        this.data = data;
        next = null;
    }
    
    /*
     * Mutator method for parameter next
     */
    public void setNext(Node next)
    {
        this.next = next;
    }

    /*
     * Accessor method for parameter next
     */
    public Node getNext()
    {
        return next;
    }
    
    /*
     * getData retuns the data held by the node
     */
    public Object getData()
    {
        return data;
    }
}

