#include <Stack.h>
Inheritance diagram for util::Stack< T >:

Items are "pushed" on the top of the stack and "popped" out of it. In other words, stack is a FILO (first-in-last-out) buffer.
Public Methods | |
| Stack (int capacity=16, int blockSize=16) | |
| Create a stack with the given initial capacity and block size. | |
| Stack (const List< T > &other) | |
| Create a copy of any list as a stack. | |
| Stack & | operator= (const List< T > &other) |
| Copy any list to a stack. | |
| void | push (T element) |
| Push an element on the top of the stack. | |
| T | pop () |
| Pop the element on the top of the stack. | |
| T & | peek () |
| See what's on the top of the stack without popping an element. | |
| const T & | peek () const |
| See what's on the top of the stack without popping an element. | |
|
|||||||||
|
See what's on the top of the stack without popping an element. Const version.
|
|
|||||||||
|
See what's on the top of the stack without popping an element.
|
|
|||||||||
|
Pop the element on the top of the stack. The stack will shrink by one element, thus there must be at least one element in the stack before calling this method. |