Packageorg.pranaframework.collections
Classpublic class TypedCollection
InheritanceTypedCollection Inheritance mx.collections.ArrayCollection

Collection that is forced to hold values of a certain type.



Public Properties
 PropertyDefined by
  type : Class
[read-only]
TypedCollection
Public Methods
 MethodDefined by
  
TypedCollection(type:Class, source:Array = null)
TypedCollection
  
addItem(item:Object):void
TypedCollection
  
addItemAt(item:Object, index:int):void
TypedCollection
  
Registers an ITypedCollectionListener listener
TypedCollection
  
createCursor():IViewCursor
TypedCollection
  
removeItem(item:Object):Boolean
Removes an item from the TypedCollection
TypedCollection
Property detail
typeproperty
type:Class  [read-only]Implementation
    public function get type():Class
Constructor detail
TypedCollection()constructor
public function TypedCollection(type:Class, source:Array = null)

Parameters
type:Class
 
source:Array (default = null)
Method detail
addItem()method
public override function addItem(item:Object):voidParameters
item:Object
addItemAt()method 
public override function addItemAt(item:Object, index:int):voidParameters
item:Object
 
index:int
addListener()method 
public function addListener(listener:ITypedCollectionListener):void

Registers an ITypedCollectionListener listener

Parameters
listener:ITypedCollectionListener — the event listener
createCursor()method 
public override function createCursor():IViewCursor

Returns
IViewCursor
removeItem()method 
public function removeItem(item:Object):Boolean

Removes an item from the TypedCollection

Parameters
item:Object — the item to be removed from the TypedCollection

Returns
Boolean — a boolean indicating the succes of the operation