Packageas3.collections
Classpublic class SortedList
InheritanceSortedList Inheritance SortedArray
ImplementsISortedList

List, whose items are kept in a sorted order defined by a comparator.

The SortedList is actually only a public name of the SortedArray from that it inherits the entire implementation.

Trying to add an item that is not comparable due to a type mismatch will throw an execption. See the SortedArray documentation.

Runtime of operations

See also

as3.collections.core.SortedArray


Public Properties
 PropertyDefined by
 InheritednumItems : uint
Returns the size of the collection.
SortedArray
Protected Properties
 PropertyDefined by
 Inherited_array : Array
The array.
SortedArray
 Inherited_comparator : IComparator
The sort criterion.
SortedArray
 Inherited_unique : uint
The specified multiplicity.
SortedArray
Public Methods
 MethodDefined by
  
SortedList(comparator:IComparator)
Creates a new SortedList.
SortedList
 Inherited
addItem(item:*):Boolean
Inserts a new item at the position predefined by the comparator's sort criterion.
SortedArray
 Inherited
clear():void
Removes all items from the collection.
SortedArray
 Inherited
countItems(item:*):uint
Returns the number of occurrences of an item.
SortedArray
 Inherited
getEqualItems(item:*):Array
Returns all items, that are equal to the given item against the sort criterion.
SortedArray
 Inherited
Returns the first item of the sequence.
SortedArray
 Inherited
getIterator(cursor:uint = 0):IIterator
Returns an iterator over the sorted list items starting at the specified position.
SortedArray
 Inherited
Returns the last item of the sequence.
SortedArray
 Inherited
hasEqualItem(item:*):Boolean
Returns true, if the list contains at least one item that is equal to the given item against the sort criterion.
SortedArray
 Inherited
hasItem(item:*):Boolean
Tests, if an item is contained by the list.
SortedArray
 Inherited
removeAll(item:*):uint
Removes all occurrences of a particular item from the list.
SortedArray
 Inherited
Removes the first item of the sequence.
SortedArray
 Inherited
removeItem(item:*):Boolean
Removes an item from the list.
SortedArray
 Inherited
Removes the last item of the sequence.
SortedArray
 Inherited
toArray():Array
Returns an array of all items in the order of the particular collection.
SortedArray
  
toString():String
Info
SortedList
Protected Methods
 MethodDefined by
 Inherited
indexOfEqual(item:*):int
Returns the index of an item that equals the given item against the sort criterion.
SortedArray
 Inherited
indexOfFirstEqual(item:*):int
Returns the index of the first item that equals the given item against the sort criterion.
SortedArray
 Inherited
indexOfLastEqual(item:*):int
Returns the index of the last item that equals the given item against the sort criterion.
SortedArray
Public Constants
 ConstantDefined by
 InheritedMULTI_SORT : uint = 0
[static] Defines that items can be contained multiple times.
SortedArray
 InheritedUNIQUE_SORT : uint = 1
[static] Defines that items can be contained only uniquely.
SortedArray
Constructor detail
SortedList()constructor
public function SortedList(comparator:IComparator)

Creates a new SortedList.

Parameters
comparator:IComparator — The sort criterion.
Method detail
toString()method
public override function toString():String

Info

Returns
String