API:System.Contnrs.TObjectStack.Peek

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Peek: TObject; inline;

C++

HIDESBASE System::TObject* __fastcall Peek();

Properties

Type Visibility Source Unit Parent
function public
System.Contnrs.pas
System.Contnrs.hpp
System.Contnrs TObjectStack

Description

Returns a pointer to the next item in the list.

System.Contnrs.TObjectStack.Peek inherits from System.Contnrs.TOrderedList.Peek. All content below this line refers to System.Contnrs.TOrderedList.Peek.

Returns a pointer to the next item in the list.

Call Peek to access the list without removing an item. Peek returns a pointer to the next item in the list.

Each TOrderedList descendant implements Peek to return a specific item from the list. For example, TQueue returns the item that was added first, while TStack returns the item that was added last.

To remove an item from the list, call Pop.

See Also