Packagecom.adobe.rtc.util
Classpublic class Sort
InheritanceSort Inheritance flash.events.EventDispatcher

Stripped down version of mx.collections.sort. Only the compareFunction & findItem functionality is available.



Public Properties
 PropertyDefined by
  compareFunction : Function
[write-only] The method used to compare items when sorting.
Sort
Protected Properties
 PropertyDefined by
  _compareFunction : Function
Sort
Public Methods
 MethodDefined by
  
Sort()
Sort
  
findItem(p_items:Array, p_values:Object, p_mode:String, p_returnInsertionIndex:Boolean = false, p_compareFunction:Function = null):int
Finds the specified object within the specified array (or the insertion point if asked for), returning the index if found or -1 if not.
Sort
Public Constants
 ConstantDefined by
  ANY_INDEX_MODE : String = "any"
[static]
Sort
  FIRST_INDEX_MODE : String = "first"
[static]
Sort
  LAST_INDEX_MODE : String = "last"
[static]
Sort
Property detail
_compareFunctionproperty
protected var _compareFunction:Function
compareFunctionproperty 
compareFunction:Function  [write-only]

The method used to compare items when sorting.

Implementation
    public function set compareFunction(value:Function):void
Constructor detail
Sort()constructor
public function Sort()
Method detail
findItem()method
public function findItem(p_items:Array, p_values:Object, p_mode:String, p_returnInsertionIndex:Boolean = false, p_compareFunction:Function = null):int

Finds the specified object within the specified array (or the insertion point if asked for), returning the index if found or -1 if not.

Parameters
p_items:Array
 
p_values:Object
 
p_mode:String
 
p_returnInsertionIndex:Boolean (default = false)
 
p_compareFunction:Function (default = null)

Returns
int
Constant detail
ANY_INDEX_MODEconstant
public static const ANY_INDEX_MODE:String = "any"
FIRST_INDEX_MODEconstant 
public static const FIRST_INDEX_MODE:String = "first"
LAST_INDEX_MODEconstant 
public static const LAST_INDEX_MODE:String = "last"




 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/labs/acrobatcom/com/adobe/rtc/util/Sort.html