Package | org.as3coreaddendum.system |
Interface | public interface ISortable |
sort()
method.
Usually the classes that implement this interface are collections of some sort.
Property | Defined By | ||
---|---|---|---|
comparator : IComparator
Defines the IComparator object to be used in the comparison. | ISortable | ||
options : uint
Defines the options to be used automatically to sort. | ISortable |
Method | Defined By | ||
---|---|---|---|
sort(compare:Function = null, options:uint = 0):Array
Sorts the objects within this class. | ISortable |
comparator | property |
comparator:IComparator
Defines the IComparator
object to be used in the comparison.
public function get comparator():IComparator
public function set comparator(value:IComparator):void
options | property |
options:uint
Defines the options to be used automatically to sort.
public function get options():uint
public function set options(value:uint):void
sort | () | method |
public function sort(compare:Function = null, options:uint = 0):Array
Sorts the objects within this class.
By default, Array.sort()
works in the following way:
Parameters
compare:Function (default = null ) — A comparison function used to determine the sorting order of elements in an array. For more info see IComparator.compare .
| |
options:uint (default = 0 ) — One or more numbers or defined constants, separated by the | (bitwise OR) operator, that change the behavior of the sort from the default.
The following values are acceptable for options :
|
Array — The return value depends on whether you pass any arguments, as described in the following list:
|
See also