Packagecom.adobe.portfolio.utils
Classpublic class SortUtil
InheritanceSortUtil Inheritance Object

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

The SortUtil class provides a set of utility functions that can be used by Sort objects.



Public Methods
 MethodDefined By
  
compareSort(a:ISort, b:ISort):Boolean
[static] compareSort checks if the two sorts are equal.
SortUtil
  
compareSortArrays(a:Array, b:Array):Boolean
[static] compareSortArrays checks if the two given sort arrays are equal.
SortUtil
  
createSortArray(sort:Object):Array
[static] Creates an array of Sort fields given a Sort Object.
SortUtil
  
createSortFieldObject(collectionSortFields:Array):Sort
[static] Creates a Sort object from a given array of sort fields.
SortUtil
Method Detail
compareSort()method
public static function compareSort(a:ISort, b:ISort):Boolean

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

compareSort checks if the two sorts are equal. The equality is determined by comparing the name and the order of the sort.

Parameters

a:ISort
 
b:ISort

Returns
Boolean — True if the two sort objects are equal
compareSortArrays()method 
public static function compareSortArrays(a:Array, b:Array):Boolean

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

compareSortArrays checks if the two given sort arrays are equal. The equality is determined by comparing the length of the arrays and each sort object in the array.

Parameters

a:Array
 
b:Array

Returns
Boolean — True if the arrays are the equal.
createSortArray()method 
public static function createSortArray(sort:Object):Array

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Creates an array of Sort fields given a Sort Object. This is the opposite of createSortFieldObject.

Parameters

sort:Object — The Sort or ISort object to be converted into an array.

Returns
Array — An array of sort fields. The fields used to sort a given collection.
createSortFieldObject()method 
public static function createSortFieldObject(collectionSortFields:Array):Sort

Language Version : ActionScript 3.0
Product Version : Portfolio 10.0
Runtime Versions : Flash Player 10.1, AIR 2.0

Creates a Sort object from a given array of sort fields.

Parameters

collectionSortFields:Array — An array of sort fields. Mostly the fields used to sort the given collection.

Returns
Sort — A mx.collections.Sort object.