TListStack
TStack<TElement>
that stores its elements in a list and allows access to those
elements using their index position in the list.
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<TElement> |
Abstract base class for collections of TElement that store their elements in a last-in-first-out manner.
|
5 | TListStack |
Source
Collection.Stack.List.pas (29)
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.
Fields
Scope | Visibility | Type | Name | Description |
---|---|---|---|---|
Instance | private | TList<TElement> | FElements |
Methods
Scope | Visibility | Result | Name | Description |
---|---|---|---|---|
Instance | protected | TComparator<TElement> | GetComparator() | |
Instance | protected | SetComparator(Value: TComparator<TElement>) | ||
Instance | protected | TInteger32 | GetCount() | |
Instance | protected | TElement | GetTop() | |
Instance | protected | TElement | GetElements(Index: TInteger32) | |
Instance | public | Create() | ||
Instance | public | Destroy() | ||
Instance | public | Push(Element: TElement) | ||
Instance | public | TElement | ExtractTop() | |
Instance | public | TBoolean | Contains(Element: TElement) | |
Instance | public | Clear() | ||
Instance | public | TIterator<TElement> | CreateIterator() |