Show: Delphi C++
Display Preferences

System.Generics.Collections.TQueue.Peek

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Peek: T; inline;

C++

T __fastcall Peek();

Properties

Type Visibility Source Unit Parent
function public
System.Generics.Collections.pas
System.Generics.Collections.hpp
System.Generics.Collections TQueue

Description

Get top item on queue.

Peek returns the top item of the queue without removing it. Count is unchanged. No event is generated. If Count is 0, an error is raised.

Peek functions similarly to Dequeue except that Dequeue removes the top item.

This is a O(1) operation.

See Also

Code Examples


Personal tools
In Other Languages
Previous Versions
Assistance