Skip to content

DsQueue

Hyomoto edited this page Dec 12, 2020 · 14 revisions
Jump To Go Back Arguments Methods Variables

DsQueue( values... )

Implements: DsChain

A garbage-collected queue.

queue = new DsQueue()

queue.enqeue( "Hello!" )
show_debug_message( queue.dequeue() );

Arguments

Name Type Purpose
values... mixed The initial values to be pushed to the queue

Methods

Jump To top enqueue enqueue_at_head dequeue head tail copy is

enqueue( values... )

Returns: N/A undefined

Name Type Purpose
values... mixed Enqueues the values at the tail of the queue

enqueue_at_head( values... )

Returns: N/A undefined

Name Type Purpose
values... mixed Enqueues the values at the head of the queue

dequeue( values... )

Returns: Mixed

Name Type Purpose
values... mixed Removes the value at the front of the queue and returns it

head( values... )

Returns: Mixed

Name Type Purpose
values... mixed Returns the value at the head of the queue

tail( values... )

Returns: Mixed

Name Type Purpose
values... mixed Removes the value at the tail of the queue and returns it

copy()

Returns: DsQueue

Name Type Purpose
None

Returns a copy of this DsQueue.


is( type )

Returns: boolean (true or false)

Name Type Purpose
type Constructor The Constructor to compare this against.

Returns true if the provided type is DsQueue.


Variables

Jump To top
  • tail_link - the value at the tail_link of the queue
Clone this wiki locally