ALKMaps.Queue

This class represents a queue

Summary
ALKMaps.Queue This class represents a queue
Properties
maxSize {Number} the maximum size of the queue.
array of records in the queue. {Array(<Object>)}
currentPosition {Number} the location index in the queue.
Constructor
ALKMaps.Queue Create a queue.
Functions
clone Clone itself.
current Get the record at the current location.
first Get the first record in the queue.
last Get the last record in the queue.
size Get the number of records in the queue.
add Add record to desired location.
remove Remove the last record.
shiftRange The number of records will be removed from the beginning of the array.
clear Clear queue data and reset current position.
destroy Destroy this queue

Properties

maxSize

{Number} the maximum size of the queue.  Default tis 100.

array of records in the queue.

{Array(<Object>)}

currentPosition

{Number} the location index in the queue.  Default is -1.

Constructor

ALKMaps.Queue

Create a queue.  Optional queue size can be passed.

Parameters (single argument)

maxSize {Number} Optional maximum queue size.  Default is 100.

Functions

clone

clone:function()

Clone itself.

current

current: function ()

Get the record at the current location.

first

first: function ()

Get the first record in the queue.

last

last: function ()

Get the last record in the queue.

size

size: function ()

Get the number of records in the queue.

add

add: function ( record )

Add record to desired location.  Remove records from top to the desired location first.

Parameters

record {Object}

remove

remove: function ()

Remove the last record.

shiftRange

shiftRange: function ( count )

The number of records will be removed from the beginning of the array.

Parameters

count {Number} number of records will be removed.

clear

clear: function ()

Clear queue data and reset current position.

destroy

destroy: function ()

Destroy this queue

clone:function()
Clone itself.
current: function ()
Get the record at the current location.
first: function ()
Get the first record in the queue.
last: function ()
Get the last record in the queue.
size: function ()
Get the number of records in the queue.
add: function ( record )
Add record to desired location.
remove: function ()
Remove the last record.
shiftRange: function ( count )
The number of records will be removed from the beginning of the array.
clear: function ()
Clear queue data and reset current position.
destroy: function ()
Destroy this queue
Close