@@ -0,0 +1,670 @@
+/*%0A  Implements a node for a stack data structure.%0A*/%0Apublic class Node%3CT%3E %7B%0A%0A  protected T data;%0A  protected Node%3CT%3E next;%0A%0A  public Node(T data) %7B%0A    this.data = data;%0A    this.next = null;%0A  %7D%0A%0A  /* Add tailNode to the end of the linked list. */%0A  protected void appendToTail(Node%3CT%3E tailNode) %7B%0A    Node%3CT%3E curr = this;%0A%0A    while (curr.next != null) %7B%0A      curr = curr.next;%0A    %7D%0A%0A    /* Set the end node */%0A    curr.next = tailNode;%0A    return;%0A  %7D%0A%0A  /* Set the current tail to null.%0A     Return the node before the node set to null. */%0A  protected Node%3CT%3E resetTail() %7B%0A    Node%3CT%3E removedTail = this.next;%0A    this.next = null;%0A    return removedTail;%0A  %7D%0A%7D%0A

Add Stack node.