| Package | org.springextensions.actionscript.collections |
| SVN browsing | EntityCollection.as |
| Fisheye | EntityCollection.as |
| Class | public class EntityCollection |
| Inheritance | EntityCollection TypedCollection mx.collections.ArrayCollection |
Entity.
No duplicate id's can be added to the collection.
Author: Cardoen Lieven
Version: $Revision: 21 $, $Date: 2008-11-01 22:58:42 +0100 (za, 01 nov 2008) $, $Author: dmurat $
Since: 0.1
| Method | Defined by | ||
|---|---|---|---|
|
EntityCollection(source:Array = null)
Creates a new
EntityCollection instance. | EntityCollection | ||
![]() |
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 | |
|
containsId(id:int):Boolean
Determines whether the collection contains an
Entity instance with the specified id. | EntityCollection | ||
|
copyFrom(range:EntityCollection):void
Adds a range to the current
EntityCollection. | EntityCollection | ||
![]() |
createCursor():IViewCursor
| TypedCollection | |
|
getEntityWithId(id:int):Entity
Retrieve the
Entity instance with the specified id. | EntityCollection | ||
![]() |
removeItem(item:Object):Boolean
Removes an item from the TypedCollection
| TypedCollection | |
| Method | Defined by | ||
|---|---|---|---|
|
check(item:Object):void
Checks if the collection already holds an Entity instance with the same
id as the passed Entity instance
| EntityCollection | ||
![]() |
collectionChange_handler(event:CollectionEvent):void
Handles the COLLECTION_CHANGE event.
| TypedCollection | |
![]() |
TypedCollectionInit(type:Class, source:Array):void
Initializes the
TypedCollectionInit instance. | TypedCollection | |
| EntityCollection | () | constructor |
public function EntityCollection(source:Array = null)
Creates a new EntityCollection instance.
source:Array (default = null) — TODO: Extra parameter with Class that should be a superclass of Entity
|
| check | () | method |
protected override function check(item:Object):voidChecks if the collection already holds an Entity instance with the same id as the passed Entity instance
Parametersitem:Object — the object to be checked
|
— if an Entity with the specified id exists in the current collection.
|
| containsId | () | method |
public function containsId(id:int):Boolean
Determines whether the collection contains an Entity instance with the specified id.
id:int — the specified id.
|
Boolean — True if the collection contains an Entity instance with the specified id.
|
| copyFrom | () | method |
public function copyFrom(range:EntityCollection):void
Adds a range to the current EntityCollection. If an entity of the range exists
in the entityCollection, then it is copied to the existing entity and
the pointer to the entity is changed to the entity of the entityCollection.
If it doesn't exist, it is added and the pointer stays.
range:EntityCollection — The EntityCollection to be added
|
| getEntityWithId | () | method |
public function getEntityWithId(id:int):Entity
Retrieve the Entity instance with the specified id.
id:int — The id of the required Entity instance.
|
Entity —
The Entity instance with the specified id.
|
— if an Entity with the specified id wasn't found in the current collection.
|