| Modifier and Type | Field and Description |
|---|---|
| protected final ConvertUtilsBean | readConverter
The formatter for all inputs to wrapped and unwrapped primitive types when a specific locale is not required. |
| protected final LocaleConvertUtilsBean | readLocaleConverter
The formatter for all inputs to wrapped and unwrapped primitive types when a specific locale is required. |
| protected final ConvertUtilsBean | writeConverter
The formatter for all inputs from wrapped and unwrapped primitive types when a specific locale is not required. |
| protected final LocaleConvertUtilsBean | writeLocaleConverter
The formatter for all inputs from wrapped and unwrapped primitive types when a specific locale is required. |
| Access | Constructor and Description |
|---|---|
| public | ConverterPrimitiveTypes(Class<?>
The class of the type of the data being processed type, String If not null or empty, specifies the locale used for
converting locale-specific data types locale, String If not null or empty, specifies the locale used for
converting locale-specific data types for writing writeLocale, Locale The locale to use for error messages. errorLocale)
|
| Modifier and Type | Method and Description |
|---|---|
| public Object | convertToRead(String value)
Implements com. Method for converting from a string to the proper data type of the destination field. |
| public String | convertToWrite(Object value)
Overrides com. Implements com. This method takes the current value of the field in question in the bean passed in and converts it to a string. |
| readConverter | back to summary |
|---|---|
| protected final ConvertUtilsBean readConverter The formatter for all inputs to wrapped and unwrapped primitive types when a specific locale is not required. Either this or It is absolutely critical that access to this member variable is always synchronized! | |
| readLocaleConverter | back to summary |
|---|---|
| protected final LocaleConvertUtilsBean readLocaleConverter The formatter for all inputs to wrapped and unwrapped primitive types when a specific locale is required. Either this or It is absolutely critical that access to this member variable is always synchronized! | |
| writeConverter | back to summary |
|---|---|
| protected final ConvertUtilsBean writeConverter The formatter for all inputs from wrapped and unwrapped primitive types when a specific locale is not required. Either this or It is absolutely critical that access to this member variable is always synchronized! | |
| writeLocaleConverter | back to summary |
|---|---|
| protected final LocaleConvertUtilsBean writeLocaleConverter The formatter for all inputs from wrapped and unwrapped primitive types when a specific locale is required. Either this or It is absolutely critical that access to this member variable is always synchronized! | |
| ConverterPrimitiveTypes | back to summary |
|---|---|
public ConverterPrimitiveTypes(Class<?> type, String locale, String writeLocale, Locale errorLocale)
| |
| convertToRead | back to summary |
|---|---|
| public Object convertToRead(String value) throws CsvDataTypeMismatchException Implements com. Doc from com. Method for converting from a string to the proper data type of the destination field.
| |
| convertToWrite | back to summary |
|---|---|
| public String convertToWrite(Object value) throws CsvDataTypeMismatchException Overrides com. Implements com. This method takes the current value of the field in question in the bean
passed in and converts it to a string.
It works for all of the primitives, wrapped primitives,
| |