| Package | as3.collections |
| Class | public class SortedSet |
| Inheritance | SortedSet Treap |
| Implements | ISortedSet |
The SortedSet is actually only a public name of the Treap from that it inherits the entire implementation.
Trying to add an item that is not comparable due to a type mismatch will throw another execption. See the Treap documentation.
Runtime of operationsSee also
| Method | Defined by | ||
|---|---|---|---|
|
SortedSet(comparator:IComparator)
Creates a new SortedSet.
| SortedSet | ||
![]() |
addItem(item:*):Boolean
Adds an item to the tree.
| Treap | |
![]() |
clear():void
Removes all items from the collection.
| Treap | |
![]() |
getEqualItem(item:*):*
Returns the item, that is equal to the given item against the sort criterion.
| Treap | |
![]() |
getFirstItem():*
Returns the lowest item of the sorted set.
| Treap | |
![]() |
getIterator(cursor:uint = 0):IIterator
Returns an iterator over the tree.
| Treap | |
![]() |
getLastItem():*
Returns the greatest item of the sorted set.
| Treap | |
![]() |
hasEqualItem(item:*):Boolean
Returns true, if the set contains at least one item that is equal
to the given item against the sort criterion.
| Treap | |
![]() |
hasItem(item:*):Boolean
Tests, if an item is contained by the set.
| Treap | |
![]() |
removeFirstItem():*
Removes the lowest item of the sorted set.
| Treap | |
![]() |
removeItem(item:*):Boolean
Removes an item from the set.
| Treap | |
![]() |
removeLastItem():*
Removes the greatest item of the sorted set.
| Treap | |
![]() |
toArray():Array
Returns an array of all items in the order of the particular collection.
| Treap | |
|
toString():String
Info
| SortedSet | ||
| SortedSet | () | constructor |
public function SortedSet(comparator:IComparator)Creates a new SortedSet.
Parameterscomparator:IComparator — The sort criterion.
|
| toString | () | method |
public override function toString():StringInfo
ReturnsString |