-
Notifications
You must be signed in to change notification settings - Fork 2
Queue
Hyomoto edited this page Jun 24, 2021
·
2 revisions
| Jump To | Go Back |
Methods | Variables |
|---|
Implements: Struct
Am alternative to the built-in queue. It makes use of a simple linked list to provide a fast, cheap, garbage-collected queue.
| Jump To | top |
push | pop | top | is_empty | size | toString |
|---|
Returns: self
| Name | Type | Purpose |
|---|---|---|
| values... | mixed |
Values to add to the queue |
Pushes the values to the queue in order.
Returns: mixed
| Name | Type | Purpose |
|---|---|---|
| None |
Pops the first value added to the queue, or EOQ if it is empty.
Returns: mixed
| Name | Type | Purpose |
|---|---|---|
| None |
Returns the value at the head of the queue, or EOQ if it is empty.
Returns: bool
| Name | Type | Purpose |
|---|---|---|
| None |
Returns true if the queue is empty.
Returns: int
| Name | Type | Purpose |
|---|---|---|
| None |
Returns the number of elements in the queue.
| Name | Type | Purpose |
|---|---|---|
| None |
Returns the contents of the stack as a string
| Jump To | top |
|---|
| Name | Type | Initial | Purpose |
|---|---|---|---|
| pool | undef |
new ObjectPool() | No description. |
| EOQ | [strict](strict) |
{} | A value that is returned when the queue is empty |
| __First | struct |
undefined | A pointer to the first node in the queue |
| __Last | struct |
undefined | A pointer to the last node in the queue |
| __Size | int |
0 | The number of nodes in the queue |
Devon Mullane 2020