mondrian.rolap
Interface RolapResult.ValueFormatter

All Known Implementing Classes:
RolapResult.CellFormatterValueFormatter, RolapResult.FormatValueFormatter
Enclosing class:
RolapResult

static interface RolapResult.ValueFormatter

Formatter to convert values into formatted strings.

Every Cell has a value, a format string (or CellFormatter) and a formatted value string. There are a wide range of possible values (pick a Double, any Double - its a value). Because there are lots of possible values, there are also lots of possible formatted value strings. On the other hand, there are only a very small number of format strings and CellFormatter's. These formatters are to be cached in a synchronized HashMaps in order to limit how many copies need to be kept around.

There are two implementations of the ValueFormatter interface:


Field Summary
static RolapResult.ValueFormatter EMPTY
          Formatter that always returns the empty string.
 
Method Summary
 java.lang.String format(java.lang.Object value, java.lang.String formatString)
          Formats a value according to a format string.
 

Field Detail

EMPTY

static final RolapResult.ValueFormatter EMPTY
Formatter that always returns the empty string.

Method Detail

format

java.lang.String format(java.lang.Object value,
                        java.lang.String formatString)
Formats a value according to a format string.

Parameters:
value - Value
formatString - Format string
Returns:
Formatted value

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads