/* The class IntNode **/
public class Node<T>
private T value; // IntNode value
private Node<T> next; // next IntNode
/* Constructor - returns a IntNode with "value" as value and without successesor IntNode
**/
public Node(T value)
[Link] = value;
[Link] = null;
/* Constructor - returns a IntNode with "value" as value and its successesor is "next" **/
public Node(T value, Node<T> next)
[Link] = value;
[Link] = next;
/* Returns the IntNode "value" **/
public T getValue()
return [Link];
/* Returns the IntNode "next" IntNode **/
public Node<T> getNext()
{
return [Link];
/* Return if the current IntNode has successor **/
public boolean hasNext()
return ([Link] != null);
/* set the value attribute to be "value" **/
public void setValue(T value)
[Link] = value;
/* set the next attribute to be "next" **/
public void setNext(Node<T> next)
[Link] = next;
/* Returns a String that describes the IntNode (and its' successesors **/
public String toString()
return value + " --> " + next;