CollectorSingleton
Static Member Summary
Static Private Members | ||
private static |
The constructor of the Diob class |
|
private static |
Warning limit. |
Constructor Summary
Private Constructor | ||
private |
|
Member Summary
Public Members | ||
public |
version: * The version of the module. |
Private Members | ||
private |
A default collection to use. |
|
private |
Collection limit on arrays. |
|
private |
The logger module this module uses to log errors / logs. |
Method Summary
Public Methods | ||
public |
Collects a instance into a collection. |
|
public |
isInCollection(pType: string, pNum: number, pCollection: Array, pRest: ...any): Object Gets diob instance(s) from the named ocllection and returns them. |
|
public |
setMaxLimit(pLimit: number) Sets the max collection limit of this module. |
Private Methods | ||
private |
cleanInstance(pDiob: Object) Cleans the diob instance so it can be reused from a fresh state |
Static Private Members
Private Constructors
private constructor() source
Public Members
Private Members
Public Methods
public collect(pCollected: Object, pCollection: Array) source
Collects a instance into a collection.
public isInCollection(pType: string, pNum: number, pCollection: Array, pRest: ...any): Object source
Gets diob instance(s) from the named ocllection and returns them. If no instances exist in the collection, a new one is created as a last resort.
Params:
Name | Type | Attribute | Description |
pType | string | The diob type to find in the collection. |
|
pNum | number | How many of the diob instances to get from the collection. |
|
pCollection | Array | The collection to retrieve these instances from. |
|
pRest | ...any | Remaining args to be passed into the new constructor of the diob or onDumped event |
public setMaxLimit(pLimit: number) source
Sets the max collection limit of this module.
Params:
Name | Type | Attribute | Description |
pLimit | number | The max limit of instances a collection can hold. |