java.lang.Object
com.pervasive.datarush.encoding.text.GenericObjectFormatter
- All Implemented Interfaces:
TokenFormatter
A formatter representing object token values as text values.
Objects are mapped to their default toString output.
-
Constructor Summary
ConstructorsConstructorDescriptionGenericObjectFormatter(ObjectTokenType<?> type) Creates a ormatter using the specified object type.GenericObjectFormatter(ObjectTokenType<?> type, String nullIndicator) Creates a formatter using the specified object type. -
Method Summary
Modifier and TypeMethodDescriptionfinal Stringformat()Formats the current value of the source as a text value.final voidsetSource(ScalarValued source) Sets the container holding values to be formatted.
-
Constructor Details
-
GenericObjectFormatter
Creates a ormatter using the specified object type. Null values are output as the empty string.- Parameters:
type- the object for which the formatter is defined
-
GenericObjectFormatter
Creates a formatter using the specified object type.- Parameters:
type- the object for which the formatter is definednullIndicator- the text value to use fo null values
-
-
Method Details
-
setSource
Description copied from interface:TokenFormatterSets the container holding values to be formatted. A reference to this container is held and accessed only when an formatting is requested.- Specified by:
setSourcein interfaceTokenFormatter- Parameters:
source- the value container to format
-
format
Description copied from interface:TokenFormatterFormats the current value of the source as a text value.- Specified by:
formatin interfaceTokenFormatter- Returns:
- the value of the source as a string
-