Top Description Fields Constructors Methods
com.opencsv.bean

public Class ConverterUUID

extends AbstractCsvConverter
Class Inheritance
Imports
com.opencsv.ICSVParser, com.opencsv.exceptions.CsvDataTypeMismatchException, org.apache.commons.lang3.StringUtils, java.util.Locale, .ResourceBundle, .UUID, java.util.regex.Pattern

This class converts an String to a java.util.UUID instance.
Author
Scott Conway
Since
5.4

Field Summary

Modifier and TypeField and Description
private static final String
Inherited from com.opencsv.bean.AbstractCsvConverter:
errorLocalelocaletypewriteLocale

Constructor Summary

AccessConstructor and Description
public
ConverterUUID(Locale
The locale to use for error messages
errorLocale
)

Initializes the class.

Method Summary

Modifier and TypeMethod and Description
public Object
convertToRead(String value)

Implements com.opencsv.bean.CsvConverter.convertToRead.

Method for converting from a string to the proper data type of the destination field.

Inherited from com.opencsv.bean.AbstractCsvConverter:
convertToWritesetErrorLocalesetLocalesetTypesetWriteLocale

Field Detail

UUID_REGEX_PATTERNback to summary
private static final String UUID_REGEX_PATTERN

Constructor Detail

ConverterUUIDback to summary
public ConverterUUID(Locale errorLocale)

Initializes the class.

Parameters
errorLocale:Locale

The locale to use for error messages

Method Detail

convertToReadback to summary
public Object convertToRead(String value) throws CsvDataTypeMismatchException

Implements com.opencsv.bean.CsvConverter.convertToRead.

Doc from com.opencsv.bean.CsvConverter.convertToRead.

Method for converting from a string to the proper data type of the destination field.

Annotations
@Override
Exceptions
CsvDataTypeMismatchException:
If the input string cannot be converted into the proper type