Caplin Trader 4.0.3

Class: module:br/presenter/formatter/KeyValueFormatter

module:br/presenter/formatter/KeyValueFormatter

Summary

Substitutes a value with a mapped value if the a mapped value exists othewise it returns the value itself. The mAttributes argument should have the map holding the mappings in it's map key.

Constructor

new module:br/presenter/formatter/KeyValueFormatter()

Implements:

Methods

format(vValue, mAttributes)

Substitutes a value with a mapped value if the a mapped value exists otherwise it returns the value itself.
Parameters:
Name Type Description
vValue Variant the key which is expected to have mapping to a value in mAttributes.map.
mAttributes Map the object which holds a map of key-value pairs in its "map" element.
Implements:
Returns:
the found value for the passed key or the the key if the value was not found.