Caplin Trader 4.5.2

Class: module:br/formatting/KeyValueFormatter

module:br/formatting/KeyValueFormatter

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/formatting/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.