| Package | system.data |
| Interface | public interface Queue extends Collection, Cloneable, Iterable, Serializable |
| Implementors | CircularQueue, LinearQueue, LinkedList, TypedQueue |
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().
| Method | Defined By | ||
|---|---|---|---|
![]() | add(o:*):Boolean
Ensures that this collection contains the specified element (optional operation). | Collection | |
![]() | clear():void
Removes all of the elements from this collection (optional operation). | Collection | |
![]() | clone():*
Creates and returns a shallow copy of the object. | Cloneable | |
![]() | contains(o:*):Boolean
Returns true if this collection contains the specified element. | Collection | |
dequeue():Boolean
Retrieves and removes the head of this queue. | Queue | ||
element():*
Retrieves, but does not remove, the head of this queue. | Queue | ||
enqueue(o:*):Boolean
Inserts the specified element into this queue, if possible. | Queue | ||
![]() | get(key:*):*
Returns the element from this collection at the passed index. | Collection | |
![]() | indexOf(o:*, fromIndex:uint = 0):int
Returns the position of the passed object in the collection. | Collection | |
![]() | isEmpty():Boolean
Returns true if this collection contains no elements. | Collection | |
![]() |
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 | ||
![]() | remove(o:*):*
Removes a single instance of the specified element from this collection, if it is present (optional operation). | Collection | |
![]() | size():uint
Retrieves the number of elements in this collection. | Collection | |
![]() | toArray():Array
Returns an array containing all of the elements in this collection. | Collection | |
![]() | toSource(indent:int = 0):String
Returns the source code string representation of the object. | Serializable | |
| dequeue | () | method |
public function dequeue():BooleanRetrieves and removes the head of this queue.
ReturnsBoolean |
| element | () | method |
public function element():*Retrieves, but does not remove, the head of this queue.
Returns* |
| enqueue | () | method |
public function enqueue(o:*):BooleanInserts the specified element into this queue, if possible.
Parameters
o:* |
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* |