Class
caplin.element.formatter

ThousandsFormatter

Constructor Summary

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

ThousandsFormatter is a flyweight singleton, and therefore this constructor should never be invoked directly.

Method Summary

Attributes Name and Description
String format(String sValue, Map mAttributes)

Adds a separator character for each 'thousand' position in a number.

String toString()

Returns a human-readable string representation of the object, which is useful for debugging.

Constructor Detail

caplin.element.formatter.ThousandsFormatter()

ThousandsFormatter is a flyweight singleton, and therefore this constructor should never be invoked directly.

Instead, it is instantiated by the RendererFactory, which reads RendererType specifications from XML and instantiates the formatters by name.

Method Detail

String format(String sValue, Map mAttributes)

Adds a separator character for each 'thousand' position in a number. eg 1000000 becomes 1,000,000

Parameters
String sValue The field value
Map mAttributes The renderer attributes
Returns
The formatted value

String toString()

Returns a human-readable string representation of the object, which is useful for debugging.

Returns
The string representation