public T PeekTail() { if (!isEmpty()) { return(tail.get_node_data()); } else { throw new Exception("Cannot peek tail. Stack is empty!"); } }
public T PeekHead() { if (!isEmpty()) { return(head.get_node_data()); } else { throw new Exception("Cannot peek head. Stack is empty!"); } }