| Package | as3.collections |
| Class | public class SortedList |
| Inheritance | SortedList SortedArray |
| Implements | ISortedList |
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 operationsSee also
| Method | Defined by | ||
|---|---|---|---|
|
SortedList(comparator:IComparator)
Creates a new SortedList.
| SortedList | ||
![]() |
addItem(item:*):Boolean
Inserts a new item at the position predefined by the comparator's sort criterion.
| SortedArray | |
![]() |
clear():void
Removes all items from the collection.
| SortedArray | |
![]() |
countItems(item:*):uint
Returns the number of occurrences of an item.
| SortedArray | |
![]() |
getEqualItems(item:*):Array
Returns all items, that are equal to the given item against the sort criterion.
| SortedArray | |
![]() |
getFirstItem():*
Returns the first item of the sequence.
| SortedArray | |
![]() |
getIterator(cursor:uint = 0):IIterator
Returns an iterator over the sorted list items starting at the specified position.
| SortedArray | |
![]() |
getLastItem():*
Returns the last item of the sequence.
| SortedArray | |
![]() |
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 | |
![]() |
hasItem(item:*):Boolean
Tests, if an item is contained by the list.
| SortedArray | |
![]() |
removeAll(item:*):uint
Removes all occurrences of a particular item from the list.
| SortedArray | |
![]() |
removeFirstItem():*
Removes the first item of the sequence.
| SortedArray | |
![]() |
removeItem(item:*):Boolean
Removes an item from the list.
| SortedArray | |
![]() |
removeLastItem():*
Removes the last item of the sequence.
| SortedArray | |
![]() |
toArray():Array
Returns an array of all items in the order of the particular collection.
| SortedArray | |
|
toString():String
Info
| SortedList | ||
| SortedList | () | constructor |
public function SortedList(comparator:IComparator)Creates a new SortedList.
Parameterscomparator:IComparator — The sort criterion.
|
| toString | () | method |
public override function toString():StringInfo
ReturnsString |