Queue
A FIFO queue.
Elements are added to the end of the queue and removed from the front.
Constructor Summary
Public Constructor | ||
public |
Constructs a new queue. |
Member Summary
Public Members | ||
public |
A list of elements. |
|
public get |
Returns true if the queue is empty, and false otherwise. |
|
public |
The head of the queue. |
|
public get |
The current size of the queue. |
Method Summary
Public Methods | ||
public |
Adds an element to the queue. |
|
public |
clear() Resets this queue. |
|
public |
Clones this queue. |
|
public |
Copies the given queue. |
|
public |
Retrieves, but does not remove, the head of the queue. |
|
public |
Retrieves and removes the head of the queue. |
Public Constructors
Public Members
Public Methods
public add(element: Object) source
Adds an element to the queue.
Params:
Name | Type | Attribute | Description |
element | Object | An arbitrary object. |
public copy(queue: Queue): Queue source
Copies the given queue.
Params:
Name | Type | Attribute | Description |
queue | Queue | A queue. |