| 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:* = null, location:int = -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 | ||
| _source | property |
protected var _source:Array| eventDispatcher | property |
protected var eventDispatcher:EventDispatcher| length | property |
length:int [read-only] The number of items in the ArrayCollection.
public function get length():int| source | property |
source:ArrayThe source of data in the ArrayCollection.
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.
Parameters
type: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 );
Parameters
item:* |
| 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.
Parameters
item:* | |
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.
Parameters
item:* |
Boolean |
| dispatchEvent | () | method |
public function dispatchEvent(event:Event):BooleanDispatches an event into the event flow.
Parameters
event:Event |
Boolean |
| getItemAt | () | method |
public function getItemAt(index:int):*Get the item at the specified index.
Parameters
index:int |
* |
| getItemIndex | () | method |
public function getItemIndex(item:*):intGet the index of the item if it is in the ArrayCollection such that getItemAt( index ) == item.
Parameters
item:* |
int |
| hasEventListener | () | method |
public function hasEventListener(type:String):BooleanChecks whether the EventDispatcher object has any listeners registered for a specific type of event.
Parameters
type:String |
Boolean |
| internalDispatchEvent | () | method |
protected function internalDispatchEvent(kind:String, item:* = null, location:int = -1):voidDispatches a collection event with the specified information.
Parameters
kind:String | |
item:* (default = null) | |
location:int (default = -1) |
| itemUpdated | () | method |
public function itemUpdated(item:*):voidNotifies the view that an item has been updated.
Parameters
item:* |
| 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.
Parameters
type:String | |
listener:Function | |
useCapture:Boolean (default = false) |
| removeItem | () | method |
public function removeItem(item:*):BooleanRemove the specified item from this list, should it exist.
Parameters
item:* |
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.
Parameters
index: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.
Parameters
item:* | |
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.
Parameters
type:String |
Boolean |
| OUT_OF_BOUNDS_MESSAGE | Constant |
protected const OUT_OF_BOUNDS_MESSAGE:String = The supplied index is out of bounds.