Skip to content
Hyomoto edited this page Jun 24, 2021 · 2 revisions
Jump To Go Back Methods Variables

Queue( )

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.

Methods

Jump To top push pop top is_empty size toString

push( values... )

Returns: self

Name Type Purpose
values... mixed Values to add to the queue

Pushes the values to the queue in order.


pop( )

Returns: mixed

Name Type Purpose
None

Pops the first value added to the queue, or EOQ if it is empty.


top( )

Returns: mixed

Name Type Purpose
None

Returns the value at the head of the queue, or EOQ if it is empty.


is_empty( )

Returns: bool

Name Type Purpose
None

Returns true if the queue is empty.


size( )

Returns: int

Name Type Purpose
None

Returns the number of elements in the queue.


toString( )

Name Type Purpose
None

Returns the contents of the stack as a string


Variables

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
Clone this wiki locally