package datastructs; public class StackNode { private T value; private StackNode next; public StackNode(T value, StackNode next) { this.value = value; this.next = next; } public StackNode getNext() { return next; } public void setNext(StackNode next) { this.next = next; } public T getValue() { return value; } public void setValue(T value) { this.value = value; } }