A simple generic stack implementation using linked lists. The stack
implementation has five main operations:
- push -- adds an element to the top of the stack
- pop -- removes an element from the top of the stack and returns a
reference to it
- peek -- peek returns an element from the top of the stack without
removing it
- isEmpty -- tests whether the stack is empty
- size -- returns the size of the stack
- toString -- returns a string representation of the stack.