Packagecom.flexcalendar.components.calendar.utils
Classpublic class InstanceCache
InheritanceInstanceCache Inheritance Object

This is generic class that can be used to manage array of instances



Public Methods
 MethodDefined By
  
InstanceCache(instanceConstructorFunction:Function, instanceArray:Array, onCreateFunction:Function, onDisposeFunction:Function)
Create InstanceCache
InstanceCache
  
setCount(requestedCount:uint):void
Sets number of instances
InstanceCache
Constructor Detail
InstanceCache()Constructor
public function InstanceCache(instanceConstructorFunction:Function, instanceArray:Array, onCreateFunction:Function, onDisposeFunction:Function)

Create InstanceCache

Parameters
instanceConstructorFunction:Function — function called to create instance - no parameters, should return value
 
instanceArray:Array — array of instances
 
onCreateFunction:Function — function called after instance creation & adding to instanceArray
 
onDisposeFunction:Function — function called after removing it from instanceArray
Method Detail
setCount()method
public function setCount(requestedCount:uint):void

Sets number of instances

Parameters

requestedCount:uint — requested instances count