| Package | org.springextensions.actionscript.collections |
| SVN browsing | TypedCollection.as |
| Fisheye | TypedCollection.as |
| Class | public class TypedCollection |
| Inheritance | TypedCollection mx.collections.ArrayCollection |
| Subclasses | EntityCollection |
Authors: Christophe Herreman, Bert Vandamme
Version: $Revision: 21 $, $Date: 2008-11-01 22:58:42 +0100 (za, 01 nov 2008) $, $Author: dmurat $
Since: 0.1
| Property | Defined by | ||
|---|---|---|---|
| type : Class [read-only]
All items added to the current
TypedCollection instance must be of this type. | TypedCollection | ||
| Method | Defined by | ||
|---|---|---|---|
|
TypedCollection(type:Class, source:Array = null)
Creates a new
TypedCollection instance for the specified type. | TypedCollection | ||
|
addItem(item:Object):void
Checks if the specified
Object is of the required type and if so adds it to the collection. | TypedCollection | ||
|
addItemAt(item:Object, index:int):void
Checks if the specified
Object is of the required type and if so adds it to the collection at the spcified index. | TypedCollection | ||
|
addListener(listener:ITypedCollectionListener):void
Registers an ITypedCollectionListener listener
| TypedCollection | ||
|
addRange(range:TypedCollection):void
Adds a list of items to the current
TypedCollection by calling
the addItem() method for every item in the specified list. | TypedCollection | ||
|
createCursor():IViewCursor
| TypedCollection | ||
|
removeItem(item:Object):Boolean
Removes an item from the TypedCollection
| TypedCollection | ||
| Method | Defined by | ||
|---|---|---|---|
|
check(item:Object):void
Checks if the passed item is of the object type of the TypedCollection
| TypedCollection | ||
|
collectionChange_handler(event:CollectionEvent):void
Handles the COLLECTION_CHANGE event.
| TypedCollection | ||
|
TypedCollectionInit(type:Class, source:Array):void
Initializes the
TypedCollectionInit instance. | TypedCollection | ||
| type | property |
type:Class [read-only]
All items added to the current TypedCollection instance must be of this type.
public function get type():Class
| TypedCollection | () | constructor |
public function TypedCollection(type:Class, source:Array = null)
Creates a new TypedCollection instance for the specified type.
type:Class — the new TypedCollection can only hold instances of this specified type.
|
|
source:Array (default = null) — an optional list of values for the new TypedCollection.
|
| addItem | () | method |
public override function addItem(item:Object):void
Checks if the specified Object is of the required type and if so adds it to the collection.
Otherwise a TypeError will be thrown.
item:Object — the Object to be added.
|
| addItemAt | () | method |
public override function addItemAt(item:Object, index:int):void
Checks if the specified Object is of the required type and if so adds it to the collection at the spcified index.
Otherwise a TypeError will be thrown.
item:Object — the Object to be added.
|
|
index:int — the position in the list where the Object needs to be added.
|
| addListener | () | method |
public function addListener(listener:ITypedCollectionListener):voidRegisters an ITypedCollectionListener listener
Parameterslistener:ITypedCollectionListener — the event listener
|
| addRange | () | method |
public function addRange(range:TypedCollection):void
Adds a list of items to the current TypedCollection by calling
the addItem() method for every item in the specified list.
range:TypedCollection |
| check | () | method |
protected function check(item:Object):voidChecks if the passed item is of the object type of the TypedCollection
Parametersitem:Object — the object to be checked
|
— if the specified Object is not of the required type.
|
| collectionChange_handler | () | method |
protected function collectionChange_handler(event:CollectionEvent):void
Handles the COLLECTION_CHANGE event. Dispatches a TypedCollectionEvent.ADD event
if the specified CollectionEvent is a CollectionEvent.ADD instance.
event:CollectionEvent |
| createCursor | () | method |
public override function createCursor():IViewCursor
Returns
IViewCursor |
| removeItem | () | method |
public function removeItem(item:Object):BooleanRemoves an item from the TypedCollection
Parametersitem:Object — the item to be removed from the TypedCollection
|
Boolean — a boolean indicating the succes of the operation
|
| TypedCollectionInit | () | method |
protected function TypedCollectionInit(type:Class, source:Array):void
Initializes the TypedCollectionInit instance.
type:Class |
|
source:Array |