Package | verlocity.core |
Class | public dynamic class ObjectStorage |
Inheritance | ObjectStorage Object |
Method | Defined By | ||
---|---|---|---|
ObjectStorage(iMaxObjects:int = 0)
Creates a object storage which holds data accessed by string keys. | ObjectStorage | ||
add(key:String, obj:Object):Object
Adds an object to the storage. | ObjectStorage | ||
clear():void
Clears all data in the storage. | ObjectStorage | ||
length(bCalc:Boolean = false):int
Returns the length of the storage. | ObjectStorage | ||
remove(key:String):void
Removes an object from the storage. | ObjectStorage | ||
retrieve(key:String):Object
Retrives an object from the store. | ObjectStorage |
ObjectStorage | () | Constructor |
public function ObjectStorage(iMaxObjects:int = 0)
Creates a object storage which holds data accessed by string keys.
ParametersiMaxObjects:int (default = 0 ) — The maximum amount of objects allowed to store. 0 means no limit.
|
add | () | method |
public function add(key:String, obj:Object):Object
Adds an object to the storage.
Parameters
key:String — The string key for object reference.
| |
obj:Object — The object to store.
|
Object —
|
clear | () | method |
public function clear():void
Clears all data in the storage.
length | () | method |
public function length(bCalc:Boolean = false):int
Returns the length of the storage.
Parameters
bCalc:Boolean (default = false ) — Re-calculate the length? (can be taxing)
|
int —
|
remove | () | method |
public function remove(key:String):void
Removes an object from the storage.
Parameters
key:String — The string key of the object.
|
retrieve | () | method |
public function retrieve(key:String):Object
Retrives an object from the store.
Parameters
key:String — The string key of the object.
|
Object —
|