The class Deque is the base class of the stack and queue. The name “Deque” was derived from “Double-ended Queue” - a double-ended queue. You can add elements to the beginning and the end of a request and read elements from both ends. The class Deque contains elements of type Variant.
Property | Type | Meaning |
---|---|---|
Size | Integer (Read-Only) | Number of elements of the Deque |
IsEmpty | Boolean (Read-Only) | True, if there are no elements in the deque, otherwise wrong |
Method | Meaning |
---|---|
Clear () | Remove all elements |
PushFront (vElement) | Attaching an element to the beginning of the Deque |
PushBack (vElement) | Attaching an element to the end of the Deque |
PopFront () | Remove and return the first element |
PopBack () | Remove and return the last element |
PeekFront () | Returns the first element without removing it |
PeekBack () | Returns the last element without removing it |
Die Klasse Deque ist die Basisklasse von Stack und Queue. Der Name “Deque” entstand aus “Double-ended Queue” – einer doppel-endigen Queue. Man kann sowohl an den Anfang als auch an das Ende einer Deque Elemente anfügen und von beiden Enden Elemente lesen. Die Klasse Deque enthält Elemente des Typs Variant.
Eigenschaft | Typ | Bedeutung |
---|---|---|
Size | Integer (Read-Only) | Anzahl der Elemente der Deque |
IsEmpty | Boolean (Read-Only) | Wahr, wenn keine Elemente in der Deque sind, sonst falsch |
Methode | Bedeutung |
---|---|
Clear() | Entfernen aller Elemente |
PushFront(vElement) | Anfügen eines Elements an den Anfang der Deque |
PushBack(vElement) | Anfügen eines Elements an das Ende der Deque |
PopFront() | Entfernen und Zurückgeben des ersten Elements |
PopBack() | Entfernen und Zurückgeben des letzten Elements |
PeekFront() | Rückgabe des ersten Elements, ohne es zu entfernen |
PeekBack() | Rückgabe des letzten Elements, ohne es zu entfernen |