Queue
| Kind of class: | class |
|---|---|
| Inherits from: | none |
| Implements: | |
| Version: | 1.0 |
| Author: | Francis Bourre |
| Classpath: | com.bourre.data.collections.Queue |
| File last modified: | Wednesday, 31 October 2007, 07:35:29 |
Summary
Constructor
Constructor
Queue
function Queue (
)
Instance methods
clear
function clear (
) : Void
Clears the queue.
dequeue
function dequeue (
) : Object
Removes and returns the first element added into the queue.
Returns:
Object.
enqueue
function enqueue (
) : Void
Adds the specified element to the queue.
Parameters:
o:
Element to add to the queue.
getElements
function getElements (
) : Array
Returns an Array of the elements in the queue.
Returns:
Array.
getLength
function getLength (
) : Number
Returns length of the queue
Returns:
Number.
isEmpty
function isEmpty (
) : Boolean
Checks if the queue is empty.
Returns:
Boolean.
peek
function peek (
) : Object
Returns the first element added into the queue.
Returns:
Object.
toString
function toString (
) : String
Returns the string representation of this instance.
Returns:
the string representation of this instance