Packageorg.juicekit.util.collection
Classpublic final class AlphanumSort
InheritanceAlphanumSort Inheritance mx.collections.Sort

The AlphanumSort class implements the natural sorting algorithm outlined at http://www.davekoelle.com/alphanum.html.

"The Alphanum Algorithm sorts strings containing a mix of letters and numbers. Given strings of mixed characters and numbers, it sorts the numbers in value order, while sorting the non-numbers in ASCII order. The end result is a natural sorting order."



Public Methods
 MethodDefined by
  
Constructor.
AlphanumSort
  
alphanumCompare(left:Object, right:Object):int
[static] Public function intended to be used directly by sortable types such as ICollectionView or types that accept custom comparison functions (e.g., DataGridColumn).
AlphanumSort
Constructor detail
AlphanumSort()constructor
public function AlphanumSort()

Constructor.

Creates a new AlphanumSort with no fields set but the a custom comparator set.

Method detail
alphanumCompare()method
public static function alphanumCompare(left:Object, right:Object):int

Public function intended to be used directly by sortable types such as ICollectionView or types that accept custom comparison functions (e.g., DataGridColumn).

Parameters
left:Object
 
right:Object

Returns
int

See also

mx.collections.ICollectionView
mx.controls.dataGridClasses.DataGridColumn