TListStack

TStack<TElement> that stores its elements in a list and allows access to those elements using their index position in the list.

Inheritance

LevelAncestorDescription
1TObjectUltimate ancestor in a class hierarchy
2TBaseObjectA base class for objects that can be used instead of TObject.
3TCollection<TElement>Abstract base class for collections that store elements of type TElement
4TStack<TElement> Abstract base class for collections of TElement that store their elements in a last-in-first-out manner.
5TListStack

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

ScopeVisibilityTypeNameDescription
InstanceprivateTList<TElement>FElements

Methods

ScopeVisibilityResultNameDescription
InstanceprotectedTComparator<TElement>GetComparator()
InstanceprotectedSetComparator(Value: TComparator<TElement>)
InstanceprotectedTInteger32GetCount()
InstanceprotectedTElementGetTop()
InstanceprotectedTElementGetElements(Index: TInteger32)
InstancepublicCreate()
InstancepublicDestroy()
InstancepublicPush(Element: TElement)
InstancepublicTElementExtractTop()
InstancepublicTBooleanContains(Element: TElement)
InstancepublicClear()
InstancepublicTIterator<TElement>CreateIterator()