| Package | weavejs.util |
| Class | public class AsyncSort |
| Inheritance | AsyncSort Object |
| Implements | ILinkableObject |
| Property | Defined By | ||
|---|---|---|---|
| debug : Boolean = false [static] | AsyncSort | ||
| result : * [read-only]
This is the sorted Array (or Vector), or null if the sort operation has not completed yet. | AsyncSort | ||
| Method | Defined By | ||
|---|---|---|---|
abort():void
Aborts the current async sort operation. | AsyncSort | ||
beginSort(arrayToSort:*, compareFunction:Function = null):void
This will begin an asynchronous sorting operation on the specified Array (or Vector). | AsyncSort | ||
compareCaseInsensitive(a:String, b:String):int [static]
This function is a wrapper for StandardLib.stringCompare(a, b, true) (case-insensitive String compare). | AsyncSort | ||
primitiveCompare(a:*, b:*):int [static]
Compares two primitive values. | AsyncSort | ||
sortImmediately(array:*, compareFunction:Function = null):void [static]
This function will sort an Array (or Vector) immediately. | AsyncSort | ||
test(compare:Object, testType:int = 0):void [static] | AsyncSort | ||
testSortOn(compare:Object, testType:int = 0):void [static] | AsyncSort | ||
| debug | property |
public static var debug:Boolean = false| result | property |
result:* [read-only] This is the sorted Array (or Vector), or null if the sort operation has not completed yet.
public function get result():*| abort | () | method |
public function abort():voidAborts the current async sort operation.
| beginSort | () | method |
public function beginSort(arrayToSort:*, compareFunction:Function = null):voidThis will begin an asynchronous sorting operation on the specified Array (or Vector). Only one sort operation can be carried out at a time. Callbacks will be triggered when the sorting operation completes. The given Array (or Vector) will be modified in-place.
Parameters
arrayToSort:* — The Array (or Vector) to sort.
| |
compareFunction:Function (default = null) — A function that compares two items and returns -1, 0, or 1.
|
See also
| compareCaseInsensitive | () | method |
public static function compareCaseInsensitive(a:String, b:String):intThis function is a wrapper for StandardLib.stringCompare(a, b, true) (case-insensitive String compare).
Parameters
a:String | |
b:String |
int |
| primitiveCompare | () | method |
public static function primitiveCompare(a:*, b:*):intCompares two primitive values. This function is faster than StandardLib.compare(), but does not do deep object compare.
Parameters
a:* | |
b:* |
int |
| sortImmediately | () | method |
public static function sortImmediately(array:*, compareFunction:Function = null):voidThis function will sort an Array (or Vector) immediately.
Parameters
array:* — An Array (or Vector) to sort in place.
| |
compareFunction:Function (default = null) — The function used to compare items in the array.
|
| test | () | method |
public static function test(compare:Object, testType:int = 0):voidParameters
compare:Object | |
testType:int (default = 0) |
| testSortOn | () | method |
public static function testSortOn(compare:Object, testType:int = 0):voidParameters
compare:Object | |
testType:int (default = 0) |