Apache Flex (FlexJS) 0.7.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
ArrayList

Package | org.apache.flex.collections
Class | public class ArrayList
Inheritance | ArrayList EventDispatcher flash.events.EventDispatcher
Implements | IBead, ICollection, IArrayList
Subclasses | FlattenedList

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The ArrayList class provides an event-driven wrapper for the standard Array. Events are dispatched when items are added, removed, or changed.

Public Properties

| Property | Defined By
--- | --- | ---
|  | id : String An id property for MXML documents. | ArrayList
|  | length : int [read-only] The number of items. | ArrayList
|  | source : Array The array of raw data needing conversion. | ArrayList
|  | strand : IStrand [write-only] | ArrayList

Public Methods

| Method | Defined By
--- | --- | ---
|  | ArrayList(initialSource:Array = null) Constructor. | ArrayList
|  | addItem(item:Object):void Adds an item to the end of the array. | ArrayList
|  | addItemAt(item:Object, index:int):void Inserts an item to a specific location within the array. | ArrayList
|  | getItemAt(index:int):Object Fetches an item from the collection | ArrayList
|  | getItemIndex(item:Object):int Fetches an item from the collection given an index. | ArrayList
|  | itemUpdated(item:Object):void Signals that an item in the array has been updated. | ArrayList
|  | itemUpdatedAt(index:int):void Signals that an item in the array has been updated. | ArrayList
|  | removeAll():void Removes all of the items from the array. | ArrayList
|  | removeItem(item:Object):Boolean Removed an item from the array and returns it. | ArrayList
|  | removeItemAt(index:int):Object Removes an item from a specific location within the array and returns it. | ArrayList
|  | setItemAt(item:Object, index:int):Object Replaces the item at the given index with a new item and returns the old item. | ArrayList
|  | toArray():Array Returns a copy of the source array. | ArrayList

Events

| Event | Summary | Defined By
--- | --- | --- | ---
|  | collectionChanged | Dispatched when the collection's underlying source array is changed. | ArrayList
|  | itemAdded | Dispatched when the collection has added an item. | ArrayList
|  | itemRemoved | Dispatched when the collection has removed an item. | ArrayList
|  | itemUpdated | Dispatched when the collection has updated an item. | ArrayList

Property Detail

id | property

`id:String`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

An id property for MXML documents.

Implementation
`public function get id():String`
`public function set id(value:String):void`

length | property |

`length:int` [read-only]

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The number of items.

Implementation
`public function get length():int`

source | property |

`source:Array`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The array of raw data needing conversion.

Implementation
`public function get source():Array`
`public function set source(value:Array):void`

strand | property |

`strand:IStrand` [write-only]

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Implementation
`public function set strand(value:IStrand):void`
Constructor Detail

ArrayList | () | Constructor

`public function ArrayList(initialSource:Array = null)`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Constructor.

Parameters

| `initialSource:Array` (default = `null`)``

Method Detail

addItem | () | method

`public function addItem(item:Object):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Adds an item to the end of the array.

Parameters

| `item:Object`

addItemAt | () | method |

`public function addItemAt(item:Object, index:int):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Inserts an item to a specific location within the array.

Parameters

| `item:Object`
| `index:int`

getItemAt | () | method |

`public function getItemAt(index:int):Object`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Fetches an item from the collection

Parameters

| `index:int`

Returns

| `Object`

getItemIndex | () | method |

`public function getItemIndex(item:Object):int`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Fetches an item from the collection given an index.

Parameters

| `item:Object`

Returns

| `int`

itemUpdated | () | method |

`public function itemUpdated(item:Object):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Signals that an item in the array has been updated.

Parameters

| `item:Object`

itemUpdatedAt | () | method |

`public function itemUpdatedAt(index:int):void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Signals that an item in the array has been updated.

Parameters

| `index:int`

removeAll | () | method |

`public function removeAll():void`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Removes all of the items from the array.

removeItem | () | method |

`public function removeItem(item:Object):Boolean`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Removed an item from the array and returns it.

Parameters

| `item:Object`

Returns

| `Boolean`

removeItemAt | () | method |

`public function removeItemAt(index:int):Object`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Removes an item from a specific location within the array and returns it.

Parameters

| `index:int`

Returns

| `Object`

setItemAt | () | method |

`public function setItemAt(item:Object, index:int):Object`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Replaces the item at the given index with a new item and returns the old item.

Parameters

| `item:Object`
| `index:int`

Returns

| `Object`

toArray | () | method |

`public function toArray():Array`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Returns a copy of the source array.

Returns

| `Array`

Event Detail

collectionChanged | Event

Event Object Type: `org.apache.flex.events.Event`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Dispatched when the collection's underlying source array is changed.

itemAdded | Event |

Event Object Type: `org.apache.flex.events.Event`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Dispatched when the collection has added an item.

itemRemoved | Event |

Event Object Type: `org.apache.flex.events.Event`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Dispatched when the collection has removed an item.

itemUpdated | Event |

Event Object Type: `org.apache.flex.events.Event`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Dispatched when the collection has updated an item.

Mon Sep 5 2016, 07:19 AM -07:00