Singleton
caplin.element.formatter

KeyValueFormatter

Substitues 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 Summary

Attributes Name and Description
caplin.element.formatter.KeyValueFormatter()

Method Summary

Attributes Name and Description
void format(Variant vValue, Map mAttributes)

Substitues a value with a mapped value if the a mapped value exists othewise it returns the value itself.

Constructor Detail

caplin.element.formatter.KeyValueFormatter()

Method Detail

void format(Variant vValue, Map mAttributes)

Substitues a value with a mapped value if the a mapped value exists othewise it returns the value itself.

Parameters
Variant vValue the key which is expected to have mapping to a value in mAttributes.map.
Map mAttributes the object which holds a map of key-value pairs in its "map" element.
Returns
the found value for the passed key or the the key if the value was not found.