Packagecom.addicted2flash.util
Classpublic class SortedArrayQueue
InheritanceSortedArrayQueue Inheritance ArrayQueue Inheritance AbstractArrayCollection
ImplementsIQueue

An unbounded sorted queue. The elements of the sorted queue are ordered by a Comparator provided at queue construction time. A sorted queue does not permit null elements.



Public Properties
 PropertyDefined by
 Inheritedlist : Array
return the internal list.
AbstractArrayCollection
Protected Properties
 PropertyDefined by
 Inherited_list : Array
AbstractArrayCollection
Public Methods
 MethodDefined by
  
SortedArrayQueue(cmp:IComparator, field:Array = null)
Create a new SortedArrayQueue
SortedArrayQueue
  
add(o:*):void
Appends the specified element to the end of this list (optional operation).
SortedArrayQueue
 Inherited
Adds all of the elements in the specified collection to this collection (optional operation).
AbstractArrayCollection
 Inherited
clear():void
Removes all of the elements from this list (optional operation).
AbstractArrayCollection
  
Returns a copy of the ICollection.
SortedArrayQueue
 Inherited
contains(o:*):Boolean
Returns true if this list contains the specified element.
AbstractArrayCollection
 Inherited
Returns true if this collection contains all of the elements in the specified collection.
AbstractArrayCollection
  
dispose():void
free memory for garbage collection.
SortedArrayQueue
 Inherited
getAt(i:int):*
Returns the element at the specified position in this collection.
AbstractArrayCollection
 Inherited
isEmpty():Boolean
Returns true if this list contains no elements.
AbstractArrayCollection
 Inherited
Returns an iterator over the elements in this list.
AbstractArrayCollection
 Inherited
peek():*
Retrieves, but does not remove, the head of this queue, or returns null if this queue is empty.
ArrayQueue
 Inherited
poll():*
Retrieves and removes the head of this queue, or returns null if this queue is empty.
ArrayQueue
 Inherited
remove(o:*):Boolean
Removes the first occurrence in this list of the specified element (optional operation).
AbstractArrayCollection
 Inherited
Removes a single instance of the specified element from this collection, if it is present (optional operation)
AbstractArrayCollection
 Inherited
size():int
Returns the number of elements in this list.
AbstractArrayCollection
 Inherited
toArray():Array
Converts the collection into an array.
AbstractArrayCollection
  
toString():String
String representation of SortedArrayQueue.
SortedArrayQueue
Constructor detail
SortedArrayQueue()constructor
public function SortedArrayQueue(cmp:IComparator, field:Array = null)

Create a new SortedArrayQueue

Parameters
cmp:IComparatorIComparator for ordering elements
 
field:Array (default = null) — ( optional ) an existing Array
Method detail
add()method
public override function add(o:*):void

Appends the specified element to the end of this list (optional operation).

Parameters
o:*
clone()method 
public override function clone():ICollection

Returns a copy of the ICollection.

Returns
ICollection — a copy of the ICollection
dispose()method 
public override function dispose():void

free memory for garbage collection.

toString()method 
public override function toString():String

String representation of SortedArrayQueue.

Returns
String — String representation of SortedArrayQueue