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

Package | org.flexunit.runner.manipulation.fields
Class | public class FieldMetaDataSorter
Inheritance | FieldMetaDataSorter Object
Implements | IFieldSorter

A field sorter capable of sorting fields based on the order argument

Public Methods

| Method | Defined By
--- | --- | ---
|  | FieldMetaDataSorter(invert:Boolean = false) Constructor | FieldMetaDataSorter
|  | compare(field1:Field, field2:Field):int Compares field1 and field2 indicating which is first or second in order | FieldMetaDataSorter

Protected Methods

| Method | Defined By
--- | --- | ---
|  | getOrderValueFrom(field:Field):Number Determines the value of the order for the argument if an order exists. | FieldMetaDataSorter

Constructor Detail

FieldMetaDataSorter | () | Constructor

`public function FieldMetaDataSorter(invert:Boolean = false)`

Constructor

Parameters

| `invert:Boolean` (default = `false`)`` — indicates a top down or bottom up sort

Method Detail

compare | () | method

`public function compare(field1:Field, field2:Field):int`

Compares field1 and field2 indicating which is first or second in order

Parameters

| `field1:Field`
| `field2:Field`

Returns

| `int` —

getOrderValueFrom | () | method |

`protected function getOrderValueFrom(field:Field):Number`

Determines the value of the order for the argument if an order exists.

Parameters

| `field:Field` — `Field` the object to have its order checked.

Returns

| `Number`

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