Packagesystem.data
Interfacepublic interface Queue extends Collection, Cloneable, Iterable, Serializable
Implementors CircularQueue, LinearQueue, LinkedList, TypedQueue

A collection designed for holding elements prior to processing. Besides basic Collection operations, queues provide additional insertion, extraction, and inspection operations.

Queues typically, but do not necessarily, order elements in a FIFO (first-in-first-out) manner.

Whatever the ordering used, the head of the queue is that element which would be removed by a call to remove() or poll().



Public Methods
 MethodDefined By
 Inherited
add(o:*):Boolean
Ensures that this collection contains the specified element (optional operation).
Collection
 Inherited
clear():void
Removes all of the elements from this collection (optional operation).
Collection
 Inherited
clone():*
Creates and returns a shallow copy of the object.
Cloneable
 Inherited
contains(o:*):Boolean
Returns true if this collection contains the specified element.
Collection
  
dequeue():Boolean
Retrieves and removes the head of this queue.
Queue
  
Retrieves, but does not remove, the head of this queue.
Queue
  
enqueue(o:*):Boolean
Inserts the specified element into this queue, if possible.
Queue
 Inherited
get(key:*):*
Returns the element from this collection at the passed index.
Collection
 Inherited
indexOf(o:*, fromIndex:uint = 0):int
Returns the position of the passed object in the collection.
Collection
 Inherited
isEmpty():Boolean
Returns true if this collection contains no elements.
Collection
 Inherited
Returns the iterator reference of the object.
Iterable
  
peek():*
Retrieves, but does not remove, the head of this queue, returning null if this queue is empty.
Queue
  
poll():*
Retrieves and removes the head of this queue.
Queue
 Inherited
remove(o:*):*
Removes a single instance of the specified element from this collection, if it is present (optional operation).
Collection
 Inherited
size():uint
Retrieves the number of elements in this collection.
Collection
 Inherited
toArray():Array
Returns an array containing all of the elements in this collection.
Collection
 Inherited
toSource(indent:int = 0):String
Returns the source code string representation of the object.
Serializable
Method Detail
dequeue()method
public function dequeue():Boolean

Retrieves and removes the head of this queue.

Returns
Boolean
element()method 
public function element():*

Retrieves, but does not remove, the head of this queue.

Returns
*
enqueue()method 
public function enqueue(o:*):Boolean

Inserts the specified element into this queue, if possible.

Parameters

o:*

Returns
Boolean
peek()method 
public function peek():*

Retrieves, but does not remove, the head of this queue, returning null if this queue is empty.

Returns
*
poll()method 
public function poll():*

Retrieves and removes the head of this queue.

Returns
*