Class Index | File Index

Classes


Class comb.collections.Queue


Extends comb.collections.Collection.

FIFO Data structure


Defined in: Queue.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
the current number of elements in this queue
 
true if this queue is empty
 
a copy of the values contained in this queue
Method Summary
Method Attributes Method Name and Description
 
Removes all items from this queue
 
contains(obj)
Determine if this queue contains the element
 
Removes first item from the head of the queue
 
enqueue(data)
Add data to this queue
 
peek()
Retrieves the item at the head of the queue without removing it
 
remove(obj)
Removes an element from this queue.
Methods borrowed from class comb.collections.Collection:
concat, indexOf, join, lastIndexOf, slice, toString
Class Detail
comb.collections.Queue()
Field Detail
{Number} count
the current number of elements in this queue

{Boolean} isEmpty
true if this queue is empty

{Array} values
a copy of the values contained in this queue
Method Detail
clear()
Removes all items from this queue

{Boolean} contains(obj)
Determine if this queue contains the element
Parameters:
{*} obj
the object to find
Returns:
{Boolean} true if this queue contains the element

{*} dequeue()
Removes first item from the head of the queue
Returns:
{*} The element removed from this queue. Returns undefined if the queue is empty.

enqueue(data)
Add data to this queue
Parameters:
{*} data
element to add

{*} peek()
Retrieves the item at the head of the queue without removing it
Returns:
{*} The element at the head of the queue. Returns undefined if the queue is empty.

{Boolean} remove(obj)
Removes an element from this queue.
Parameters:
{*} obj
the data to remove.
Returns:
{Boolean} true if the element was removed, false otherwise.

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Oct 25 2011 13:20:06 GMT-0500 (CDT)