| Package | org.igniterealtime.xiff.collections |
| Class | public class ArrayCollection |
| Inheritance | ArrayCollection flash.utils.Proxy |
| Implements | ICollection |
| Subclasses | Room, Roster |
| Property | Defined by | ||
|---|---|---|---|
| length : int [read-only]
The number of items in the ArrayCollection.
| ArrayCollection | ||
| source : Array
The source of data in the ArrayCollection.
| ArrayCollection | ||
| Property | Defined by | ||
|---|---|---|---|
| eventDispatcher : EventDispatcher | ArrayCollection | ||
| _source : Array | ArrayCollection | ||
| Method | Defined by | ||
|---|---|---|---|
|
ArrayCollection(source:Array = null)
Constructor.
| ArrayCollection | ||
|
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
| ArrayCollection | ||
|
addItem(item:*):void
Add the specified item to the end of the list.
| ArrayCollection | ||
|
addItemAt(item:*, index:int):void
Add the specified item at the specified index.
| ArrayCollection | ||
|
clearSource():void
Remove all items from the ArrayCollection without dispatching a RESET event.
| ArrayCollection | ||
|
contains(item:*):Boolean
Returns whether the ArrayCollection contains the specified item.
| ArrayCollection | ||
|
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
| ArrayCollection | ||
|
getItemAt(index:int):*
Get the item at the specified index.
| ArrayCollection | ||
|
getItemIndex(item:*):int
Get the index of the item if it is in the ArrayCollection such that getItemAt( index ) == item.
| ArrayCollection | ||
|
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
| ArrayCollection | ||
|
itemUpdated(item:*):void
Notifies the view that an item has been updated.
| ArrayCollection | ||
|
removeAll():void
Remove all items from the ArrayCollection.
| ArrayCollection | ||
|
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
| ArrayCollection | ||
|
removeItem(item:*):Boolean
Remove the specified item from this list, should it exist.
| ArrayCollection | ||
|
removeItemAt(index:int):*
Removes the item at the specified index and returns it.
| ArrayCollection | ||
|
setItemAt(item:*, index:int):*
Places the item at the specified index.
| ArrayCollection | ||
|
toArray():Array
Return an Array that is populated in the same order as the ArrayCollection.
| ArrayCollection | ||
|
toString():String
Pretty prints the contents of the ArrayCollection to a string and returns it.
| ArrayCollection | ||
|
willTrigger(type:String):Boolean
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
| ArrayCollection | ||
| Method | Defined by | ||
|---|---|---|---|
|
internalDispatchEvent(kind:String, item:int = null, location:* = -1):void
Dispatches a collection event with the specified information.
| ArrayCollection | ||
| Constant | Defined by | ||
|---|---|---|---|
| OUT_OF_BOUNDS_MESSAGE : String = "The supplied index is out of bounds." | ArrayCollection | ||
| eventDispatcher | property |
protected var eventDispatcher:EventDispatcher
| length | property |
length:int [read-only]The number of items in the ArrayCollection.
Implementation public function get length():int
| _source | property |
protected var _source:Array
| source | property |
source:Array [read-write]The source of data in the ArrayCollection.
Implementation public function get source():Array
public function set source(value:Array):void
| ArrayCollection | () | constructor |
public function ArrayCollection(source:Array = null)Constructor.
Parameterssource:Array (default = null) |
| addEventListener | () | method |
public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):voidRegisters an event listener object with an EventDispatcher object so that the listener receives notification of an event.
Parameterstype:String |
|
listener:Function |
|
useCapture:Boolean (default = false) |
|
priority:int (default = 0) |
|
useWeakReference:Boolean (default = false) |
| addItem | () | method |
public function addItem(item:*):voidAdd the specified item to the end of the list. Equivalent to addItemAt( item, length );
Parametersitem:* |
| addItemAt | () | method |
public function addItemAt(item:*, index:int):voidAdd the specified item at the specified index. Any item that was after this index is moved out by one.
Parametersitem:* |
|
index:int |
| clearSource | () | method |
public function clearSource():voidRemove all items from the ArrayCollection without dispatching a RESET event.
| contains | () | method |
public function contains(item:*):BooleanReturns whether the ArrayCollection contains the specified item.
Parametersitem:* |
Boolean |
| dispatchEvent | () | method |
public function dispatchEvent(event:Event):BooleanDispatches an event into the event flow.
Parametersevent:Event |
Boolean |
| getItemAt | () | method |
public function getItemAt(index:int):*Get the item at the specified index.
Parametersindex:int |
* |
| getItemIndex | () | method |
public function getItemIndex(item:*):intGet the index of the item if it is in the ArrayCollection such that getItemAt( index ) == item.
Parametersitem:* |
int |
| hasEventListener | () | method |
public function hasEventListener(type:String):BooleanChecks whether the EventDispatcher object has any listeners registered for a specific type of event.
Parameterstype:String |
Boolean |
| internalDispatchEvent | () | method |
protected function internalDispatchEvent(kind:String, item:int = null, location:* = -1):voidDispatches a collection event with the specified information.
Parameterskind:String |
|
item:int (default = null) |
|
location:* (default = -1) |
| itemUpdated | () | method |
public function itemUpdated(item:*):voidNotifies the view that an item has been updated.
Parametersitem:* |
| removeAll | () | method |
public function removeAll():voidRemove all items from the ArrayCollection.
| removeEventListener | () | method |
public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):voidRemoves a listener from the EventDispatcher object.
Parameterstype:String |
|
listener:Function |
|
useCapture:Boolean (default = false) |
| removeItem | () | method |
public function removeItem(item:*):BooleanRemove the specified item from this list, should it exist.
Parametersitem:* |
Boolean |
| removeItemAt | () | method |
public function removeItemAt(index:int):*Removes the item at the specified index and returns it. Any items that were after this index are now one index earlier.
Parametersindex:int |
* |
| setItemAt | () | method |
public function setItemAt(item:*, index:int):*Places the item at the specified index. If an item was already at that index the new item will replace it and it will be returned.
Parametersitem:* |
|
index:int |
* |
| toArray | () | method |
public function toArray():ArrayReturn an Array that is populated in the same order as the ArrayCollection.
ReturnsArray |
| toString | () | method |
public function toString():StringPretty prints the contents of the ArrayCollection to a string and returns it.
ReturnsString |
| willTrigger | () | method |
public function willTrigger(type:String):BooleanChecks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
Parameterstype:String |
Boolean |
| OUT_OF_BOUNDS_MESSAGE | constant |
protected const OUT_OF_BOUNDS_MESSAGE:String = "The supplied index is out of bounds."