Packagecom.addicted2flash.util
Classpublic class ObservableArrayList
InheritanceObservableArrayList Inheritance ArrayList Inheritance AbstractArrayList Inheritance AbstractArrayCollection
ImplementsIListObservable

Array based list. Implements all optional list operations, and permits all elements, including null. In addition events will be triggered after list has changed.

See also

ListEventType


Public Properties
 PropertyDefined by
 Inheritedlist : Array
return the internal list.
AbstractArrayCollection
 InheritedlistIterator : IListIterator
Returns the IListIterator of the IList.
AbstractArrayList
  listObserverCount : int
[read-only] Returns the total count of registered IListObserver.
ObservableArrayList
Protected Properties
 PropertyDefined by
 Inherited_list : Array
AbstractArrayCollection
Public Methods
 MethodDefined by
  
ObservableArrayList(field:Array = null)
Creates a new ObservableArrayList.
ObservableArrayList
  
add(o:*):void
Appends the specified element to the end of this list (optional operation).
ObservableArrayList
 Inherited
Adds all of the elements in the specified collection to this collection (optional operation).
AbstractArrayCollection
 Inherited
addAllAt(i:int, c:ICollection):void
Adds all of the elements in the specified collection to this collection at a specified position in this list.
AbstractArrayList
  
addAt(i:int, o:*):void
Inserts the specified element at the specified position in this list (optional operation).
ObservableArrayList
  
Adds an IListObserver to the set of observers for this object, provided that it is not the same as some observer already in the set.
ObservableArrayList
  
clear():void
Removes all of the elements from this list (optional operation).
ObservableArrayList
  
Returns a copy of the ICollection.
ObservableArrayList
 Inherited
contains(o:*):Boolean
Returns true if this list contains the specified element.
AbstractArrayCollection
 Inherited
Returns true if this collection contains all of the elements in the specified collection.
AbstractArrayCollection
  
dispose():void
free memory for garbage collection.
ObservableArrayList
 Inherited
getAt(i:int):*
Returns the element at the specified position in this collection.
AbstractArrayCollection
 Inherited
indexOf(o:*):int
Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.
AbstractArrayList
 Inherited
isEmpty():Boolean
Returns true if this list contains no elements.
AbstractArrayCollection
 Inherited
Returns an iterator over the elements in this list.
AbstractArrayCollection
 Inherited
lastIndexOf(o:*):int
Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element.
AbstractArrayList
  
remove(o:*):Boolean
Removes the first occurrence in this list of the specified element (optional operation).
ObservableArrayList
 Inherited
Removes a single instance of the specified element from this collection, if it is present (optional operation)
AbstractArrayCollection
  
removeArea(fromIndex:int, toIndex:int):IList
Removes an area in the current list.
ObservableArrayList
  
removeAt(i:int):*
Removes the element at the specified position in this list (optional operation).
ObservableArrayList
  
Deletes an IListObserver from the set of observers of this object.
ObservableArrayList
 Inherited
setAt(i:int, o:*):*
Replaces the element at the specified position in this list with the specified element (optional operation).
AbstractArrayList
 Inherited
size():int
Returns the number of elements in this list.
AbstractArrayCollection
 Inherited
subList(fromIndex:int, toIndex:int):IList
ArrayList
 Inherited
swap(o1:*, o2:*):Boolean
AbstractArrayList
 Inherited
swapAt(i1:int, i2:int):Boolean
AbstractArrayList
 Inherited
toArray():Array
Converts the collection into an array.
AbstractArrayCollection
  
toString():String
String representation of ObservableArrayList.
ObservableArrayList
Property detail
listObserverCountproperty
listObserverCount:int  [read-only]

Returns the total count of registered IListObserver.

Implementation
    public function get listObserverCount():int
Constructor detail
ObservableArrayList()constructor
public function ObservableArrayList(field:Array = null)

Creates a new ObservableArrayList.

Parameters
field:Array (default = null) — an existing Array
Method detail
add()method
public override function add(o:*):void

Appends the specified element to the end of this list (optional operation).

Parameters
o:*
addAt()method 
public override function addAt(i:int, o:*):void

Inserts the specified element at the specified position in this list (optional operation).

Parameters
i:int — index
 
o:*
addListObserver()method 
public function addListObserver(o:IListObserver):void

Adds an IListObserver to the set of observers for this object, provided that it is not the same as some observer already in the set.

Parameters
o:IListObserver — an IListObserver to be added.
clear()method 
public override function clear():void

Removes all of the elements from this list (optional operation).

clone()method 
public override function clone():ICollection

Returns a copy of the ICollection.

Returns
ICollection — a copy of the ICollection
dispose()method 
public override function dispose():void

free memory for garbage collection.

remove()method 
public override function remove(o:*):Boolean

Removes the first occurrence in this list of the specified element (optional operation).

Parameters
o:*

Returns
Boolean — true if this collection changed as a result of the call
removeArea()method 
public override function removeArea(fromIndex:int, toIndex:int):IList

Removes an area in the current list.

Parameters
fromIndex:int — low endpoint (including) of the list
 
toIndex:int — high endpoint (excluding) of the list

Returns
IList — the removed area
removeAt()method 
public override function removeAt(i:int):*

Removes the element at the specified position in this list (optional operation).

Parameters
i:int — index

Returns
* — the removed object
removeListObserver()method 
public function removeListObserver(o:IListObserver):void

Deletes an IListObserver from the set of observers of this object.

Parameters
o:IListObserver — the IListObserver to be deleted.
toString()method 
public override function toString():String

String representation of ObservableArrayList.

Returns
String — String representation of ObservableArrayList