TStack
Abstract base class for collections of
TElement
that store their elements in a last-in-first-out manner.
Inheritance
Level | Ancestor | Description |
---|---|---|
1 | TObject | Ultimate ancestor in a class hierarchy |
2 | TBaseObject | A base class for objects that can be used instead of TObject . |
3 | TCollection<TElement> | Abstract base class for collections that store elements of type TElement |
4 | TStack |
Source
Collection.Stack.pas (25)
Description
Using Push
and Pop
one can respectively add elements to and
and remove elements from the Top
of the stack. Iteration over the contents of
a stack will go from top to bottom.
Methods
Scope | Visibility | Result | Name | Description |
---|---|---|---|---|
Instance | protected | TElement | GetTop() | |
Instance | public | TBoolean | Add(Element: TElement) | |
Instance | public | TElement | Extract(Element: TElement) | |
Instance | public | TElement | Dequeue() | |
Instance | public | Push(Element: TElement) | ||
Instance | public | TElement | ExtractTop() | |
Instance | public | TElement | Pop() |