Packagecom.addicted2flash.util
Interfacepublic interface ISortedSet extends ISet, ICollection, IDisposable
ImplementorsSortedArraySet

A Set that further provides a total ordering on its elements. The elements are ordered by a Comparator provided at sorted set creation time. The set's iterator will traverse the set in ascending element order.



Public Methods
 MethodDefined by
 Inherited
add(o:*):void
Appends the specified element to the end of this list (optional operation).
ICollection
 Inherited
Adds all of the elements in the specified collection to this collection (optional operation).
ICollection
 Inherited
clear():void
Removes all of the elements from this list (optional operation).
ICollection
 Inherited
Returns a copy of the ICollection.
ICollection
  
Returns the comparator used to order the elements in this set.
ISortedSet
 Inherited
contains(o:*):Boolean
Returns true if this list contains the specified element.
ICollection
 Inherited
Returns true if this collection contains all of the elements in the specified collection.
ICollection
 Inherited
dispose():void
free memory for garbage collection.
IDisposable
  
first():*
Returns the first (lowest) element currently in this set.
ISortedSet
 Inherited
getAt(i:int):*
Returns the element at the specified position in this collection.
ICollection
  
headSortedSet(toElement:*):ISortedSet
Returns a view of the portion of this set whose elements are strictly less than toElement.
ISortedSet
 Inherited
isEmpty():Boolean
Returns true if this list contains no elements.
ICollection
 Inherited
Returns an iterator over the elements in this list.
ICollection
  
last():*
Returns the last (highest) element currently in this set.
ISortedSet
 Inherited
remove(o:*):Boolean
Removes the first occurrence in this list of the specified element (optional operation).
ICollection
 Inherited
Removes a single instance of the specified element from this collection, if it is present (optional operation)
ICollection
 Inherited
size():int
Returns the number of elements in this list.
ICollection
  
subSortedSet(fromElement:*, toElement:*):ISortedSet
Returns a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive.
ISortedSet
  
tailSortedSet(fromElement:*):ISortedSet
Returns a view of the portion of this set whose elements are greater than or equal to fromElement.
ISortedSet
 Inherited
toArray():Array
Converts the collection into an array.
ICollection
Method detail
comparator()method
public function comparator():IComparator

Returns the comparator used to order the elements in this set.

Returns
IComparator — the comparator used to order the elements in this set.
first()method 
public function first():*

Returns the first (lowest) element currently in this set.

Returns
* — the first (lowest) element currently in this set (or null if set is empty)
headSortedSet()method 
public function headSortedSet(toElement:*):ISortedSet

Returns a view of the portion of this set whose elements are strictly less than toElement. The returned set is backed by this set, so changes in the returned set are reflected in this set, and vice-versa. The returned set supports all optional set operations that this set supports.

Parameters
toElement:* — high endpoint (exclusive) of the returned set

Returns
ISortedSet — a view of the portion of this set whose elements are strictly less than toElement (return empty sorted set, if toElement doesn't exist)
last()method 
public function last():*

Returns the last (highest) element currently in this set.

Returns
* — the last (highest) element currently in this set (or null if set is empty)
subSortedSet()method 
public function subSortedSet(fromElement:*, toElement:*):ISortedSet

Returns a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive. (If fromElement and toElement are equal, the returned set is empty.) The returned set is backed by this set, so changes in the returned set are reflected in this set, and vice-versa. The returned set supports all optional set operations that this set supports.

Parameters
fromElement:* — low endpoint (inclusive) of the returned set
 
toElement:* — high endpoint (exclusive) of the returned set

Returns
ISortedSet — a view of the portion of this set whose elements range from fromElement, inclusive, to toElement, exclusive
tailSortedSet()method 
public function tailSortedSet(fromElement:*):ISortedSet

Returns a view of the portion of this set whose elements are greater than or equal to fromElement. The returned set is backed by this set, so changes in the returned set are reflected in this set, and vice-versa. The returned set supports all optional set operations that this set supports.

Parameters
fromElement:* — low endpoint (inclusive) of the returned set

Returns
ISortedSet — a view of the portion of this set whose elements are greater than or equal to fromElement