/**
 * A linked list node
 * 
 * @author extracted from Duane Bailey's structure5 library
 *
 * @param <E> the type of data to be stored in the node
 */
public class Node<E> { 
	private E data; 
	private Node<E> nextElement; 
	
	public Node(E v, Node<E> next) { 
		data = v; 
		nextElement = next; 
	} 
	
	public Node(E v) { 
		this(v,null); 
	}
	
	public Node<E> next() { 
		return nextElement; 
	} 
	
	public void setNext(Node<E> next) { 
		nextElement = next; 
	} 
	
	public E value() { 
		return data; 
	} 
	
	public void setValue(E value) { 
		data = value; 
	} 
	
	public String toString() { 
		return "<Node: "+value()+">"; 
	} 
}