Packageorg.servebox.commons.collection
Classpublic class SortedSet
InheritanceSortedSet Inheritance AbstractSet Inheritance AbstractCollection Inheritance BasicObject
ImplementsISortedSet

Implementation of the ISortedSet interface.



Public Properties
 PropertyDefined by
 InheritedinternalInstanceId : uint
The internal instance id of the object.
BasicObject
Protected Properties
 PropertyDefined by
 Inherited_list : Array
AbstractCollection
Public Methods
 MethodDefined by
  
SortedSet(collection:ICollection = null, comp:IComparator = null)
Creates a new SortedSet object.
SortedSet
  
add(o:IBasicObject):Boolean
Adds the specified element to the collection.
SortedSet
 Inherited
addAll(c:ICollection):Boolean
Adds the specified elements to the collection.
AbstractCollection
 Inherited
clear():void
Empties the collection.
AbstractCollection
 Inherited
Indicates whether the collection contains the specified element.
AbstractCollection
 Inherited
Indicates whether the collection contains the specified elements.
AbstractCollection
 Inherited
equals(o:IBasicObject):Boolean
Object comparison mechanism.
AbstractCollection
  
Retrieves the first element in this set.
SortedSet
 Inherited
fromArray(ar:Array):void
Sets the collection content using an Array of elements.
AbstractCollection
 Inherited
Generates a unique unsigned integer id at instanciation
BasicObject
 Inherited
hashCode():int
Returns the hashcode of the object.
BasicObject
  
headSet(toElement:IBasicObject, inclusive:Boolean = false):SortedSet
Retrieves the part of this set whose elements are less than (or equal to, if inclusive is true) toElement.
SortedSet
 Inherited
isEmpty():Boolean
Indicates whether the collection contains elements.
AbstractSet
 Inherited
Retrieves an iterator over a set of objects.
AbstractCollection
  
Retrieves the last element in this set.
SortedSet
  
remove(o:IBasicObject):Boolean
Removes the specified element from the collection.
SortedSet
 Inherited
Removes the specified elements from the collection.
AbstractSet
 Inherited
size():int
The number of elements in the collection.
AbstractCollection
  
subSet(fromElement:IBasicObject, toElement:IBasicObject, fromInclusive:Boolean = true, toInclusive:Boolean = false):SortedSet
Retrieves the part of this set whose elements range from fromElement to toElement.
SortedSet
  
tailSet(fromElement:IBasicObject, inclusive:Boolean = true):SortedSet
Retrieves the part of this set whose elements are greater than or equal to (unless inclusive is false) fromElement.
SortedSet
 Inherited
toArray():Array
Retrieves the elements of the collection into an Array instance.
AbstractCollection
 Inherited
toString():String
Returns the string representation of the specified object.
BasicObject
Protected Methods
 MethodDefined by
 Inherited
AbstractCollection
  
sortList():void
Sorts the inner list according to the comparator instance.
SortedSet
Constructor detail
SortedSet()constructor
public function SortedSet(collection:ICollection = null, comp:IComparator = null)

Creates a new SortedSet object.

Parameters
collection:ICollection (default = null)
 
comp:IComparator (default = null)
Method detail
add()method
public override function add(o:IBasicObject):Boolean

Adds the specified element to the collection.

Parameters
o:IBasicObject

Returns
Boolean
first()method 
public function first():IBasicObject

Retrieves the first element in this set.

Returns
IBasicObject
headSet()method 
public function headSet(toElement:IBasicObject, inclusive:Boolean = false):SortedSet

Retrieves the part of this set whose elements are less than (or equal to, if inclusive is true) toElement.

Parameters
toElement:IBasicObject
 
inclusive:Boolean (default = false)

Returns
SortedSet
last()method 
public function last():IBasicObject

Retrieves the last element in this set.

Returns
IBasicObject
remove()method 
public override function remove(o:IBasicObject):Boolean

Removes the specified element from the collection.

Parameters
o:IBasicObject

Returns
Boolean
sortList()method 
protected function sortList():void

Sorts the inner list according to the comparator instance.

subSet()method 
public function subSet(fromElement:IBasicObject, toElement:IBasicObject, fromInclusive:Boolean = true, toInclusive:Boolean = false):SortedSet

Retrieves the part of this set whose elements range from fromElement to toElement.

Parameters
fromElement:IBasicObject
 
toElement:IBasicObject
 
fromInclusive:Boolean (default = true)
 
toInclusive:Boolean (default = false)

Returns
SortedSet
tailSet()method 
public function tailSet(fromElement:IBasicObject, inclusive:Boolean = true):SortedSet

Retrieves the part of this set whose elements are greater than or equal to (unless inclusive is false) fromElement.

Parameters
fromElement:IBasicObject
 
inclusive:Boolean (default = true)

Returns
SortedSet