public class ExportableFieldFormatter extends java.lang.Object implements Formatter<ExportableField>
ExportableField.getTitle()
.
Note! Do not confuse this formatter with the formatter returned
from ExportableField.getFormatter()
. That formatter is about
formatting the exported values, while this formatter is about
formatting the column header.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
nullValue |
Constructor and Description |
---|
ExportableFieldFormatter()
Create a new formatter.
|
ExportableFieldFormatter(java.lang.String nullValue)
Create a new formatter.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
format(ExportableField value)
Format a value by converting it to a string.
|
ExportableField |
parseString(java.lang.String value)
Parse a string and return a value of the correct type.
|
public ExportableFieldFormatter()
public ExportableFieldFormatter(java.lang.String nullValue)
nullValue
- The string to return if a null item is
passed to format(ExportableField)
public java.lang.String format(ExportableField value)
Formatter
format
in interface Formatter<ExportableField>
value
- The value to formatpublic ExportableField parseString(java.lang.String value)
Formatter
parseString
in interface Formatter<ExportableField>
value
- The string to parsejava.lang.UnsupportedOperationException
- Always