AggregatedCollection

Collection of maps. This collection aggregate maps with the same type of values. Values from the registered maps
can be used to calculate a single result for particular index.

Members

aggregationFunction

Function which do aggregation on the values for particular index.

fallbackValue

Fallback value when there is no calculated value for particular index.

mergedValuesCacheArray

List of merged values. Value for each index is calculated using values inside registered maps.

Methods

getMergedValueAtIndex(index, readFromCache){*}

Get merged value for particular index.

Parameters:
Name Type Default Description
index number

Index for which we calculate single result.

readFromCache boolean true optional

Determine if read results from the cache.

Returns: {*}

getMergedValues(readFromCache){Array}

Get merged values for all indexes.

Parameters:
Name Type Default Description
readFromCache boolean true optional

Determine if read results from the cache.

Returns: {Array}

updateCache()

Rebuild cache for the collection.

Class: AggregatedCollection