API Documentation | All Packages | All Classes | Index | Frames No Frames |
Sorter

Package | org.flexunit.runner.manipulation
Class | public class Sorter
Inheritance | Sorter Object
Implements | ISorter

A `Sorter` orders tests. In general you will not need to use a `Sorter` directly. Instead, use `org.flexunit.runner.Request#sortWith(Function)`.

See also

org.flexunit.runner.Request.sortWith()

Public Methods

| Method | Defined By
--- | --- | ---
|  | Sorter(comparator:Function) Constructor. | Sorter
|  | apply(object:Object):void Sorts the test in runner using comparator/ | Sorter
|  | compare(o1:IDescription, o2:IDescription):int Compares its two arguments for order. | Sorter

Constructor Detail

Sorter | () | Constructor

`public function Sorter(comparator:Function)`

Constructor. Creates a `Sorter` that uses the `comparator` to sort tests.

Parameters

| `comparator:Function` — the `Function` to use when sorting tests.

Method Detail

apply | () | method

`public function apply(object:Object):void`

Sorts the test in `runner` using `comparator`/

Parameters

| `object:Object`

compare | () | method |

`public function compare(o1:IDescription, o2:IDescription):int`

Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Parameters

| `o1:IDescription` — `IDescription` the first object to be compared.
| `o2:IDescription` — `IDescription` the second object to be compared.

Returns

| `int`

Thu Apr 10 2014, 08:07 AM +10:00