-
Notifications
You must be signed in to change notification settings - Fork 0
linkedqueue
dastal - v5.0.0 / LinkedQueue
A linked list implementation of the Queue interface
Name |
---|
T |
- Queue<T>
• new LinkedQueue<T>(elements?
)
Instantiate the queue.
Name |
---|
T |
Name | Type | Description |
---|---|---|
elements? |
Iterable <T> |
A set of elements to initialize the queue with. |
• Protected
list: List<T>
The list containing every element.
• get
size(): number
The number of elements in the collection.
number
▸ [iterator](): Iterator
<T, any, undefined>
Receive an iterator through the queue.
Note: Unexpected behavior can occur if the collection is modified during iteration.
Iterator
<T, any, undefined>
An iterator through the queue
▸ clear(): void
Removes all elements.
void
▸ dequeue(): undefined
| T
Retrieves and removes the head of this queue
undefined
| T
▸ enqueue(element
): number
Inserts the specified value into this queue
Name | Type |
---|---|
element |
T |
number
▸ peek(): undefined
| T
Retrieves, but does not remove, the head of this queue
undefined
| T