Packageorg.servebox.commons.collection
Interfacepublic interface ISortedSet extends ISet, ICollection, IBasicObject, IIterable
ImplementorsSortedSet

A Set that provides ordering on its elements. The elements are ordered using their natural ordering, or by a IComparator provided at creation time.



Public Methods
 MethodDefined by
 Inherited
add(o:IBasicObject):Boolean
Adds the specified element to the collection.
ICollection
 Inherited
addAll(c:ICollection):Boolean
Adds the specified elements to the collection.
ICollection
 Inherited
clear():void
Empties the collection.
ICollection
 Inherited
Indicates whether the collection contains the specified element.
ICollection
 Inherited
Indicates whether the collection contains the specified elements.
ICollection
 Inherited
equals(value:IBasicObject):Boolean
Object comparison mechanism.
IBasicObject
  
Retrieves the first element in this set.
ISortedSet
 Inherited
fromArray(ar:Array):void
Sets the collection content using an Array of elements.
ICollection
 Inherited
hashCode():int
Returns the hashcode of the object.
IBasicObject
  
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.
ISortedSet
 Inherited
isEmpty():Boolean
Indicates whether the collection contains elements.
ICollection
 Inherited
Retrieves an iterator over a set of objects.
IIterable
  
Retrieves the last element in this set.
ISortedSet
 Inherited
remove(o:IBasicObject):Boolean
Removes the specified element from the collection.
ICollection
 Inherited
Removes the specified elements from the collection.
ICollection
 Inherited
size():int
The number of elements in the collection.
ICollection
  
subSet(fromElement:IBasicObject, toElement:IBasicObject, fromInclusive:Boolean = false, toInclusive:Boolean = false):SortedSet
Retrieves the part of this set whose elements range from fromElement to toElement.
ISortedSet
  
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.
ISortedSet
 Inherited
toArray():Array
Retrieves the elements of the collection into an Array instance.
ICollection
 Inherited
toString():String
Returns the string representation of the specified object.
IBasicObject
Method detail
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
subSet()method 
public function subSet(fromElement:IBasicObject, toElement:IBasicObject, fromInclusive:Boolean = false, 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 = false)
 
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