Package com.opencsv.bean
Class ConverterUUID
- java.lang.Object
-
- com.opencsv.bean.AbstractCsvConverter
-
- com.opencsv.bean.ConverterUUID
-
- All Implemented Interfaces:
CsvConverter
public class ConverterUUID extends AbstractCsvConverter
This class converts an String to aUUIDinstance.- Since:
- 5.4
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringUUID_REGEX_PATTERN-
Fields inherited from class com.opencsv.bean.AbstractCsvConverter
errorLocale, locale, type, writeLocale
-
-
Constructor Summary
Constructors Constructor Description ConverterUUID(java.util.Locale errorLocale)Initializes the class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectconvertToRead(java.lang.String value)Method for converting from a string to the proper data type of the destination field.-
Methods inherited from class com.opencsv.bean.AbstractCsvConverter
convertToWrite, setErrorLocale, setLocale, setType, setWriteLocale
-
-
-
-
Field Detail
-
UUID_REGEX_PATTERN
private static final java.lang.String UUID_REGEX_PATTERN
- See Also:
- Constant Field Values
-
-
Method Detail
-
convertToRead
public java.lang.Object convertToRead(java.lang.String value) throws CsvDataTypeMismatchExceptionDescription copied from interface:CsvConverterMethod for converting from a string to the proper data type of the destination field.- Parameters:
value- The string from the selected field of the CSV file. If the field is marked as required in the annotation, this value is guaranteed not to benull, empty or blank according toStringUtils.isBlank(java.lang.CharSequence)- Returns:
- An
Objectrepresenting the input data converted into the proper type - Throws:
CsvDataTypeMismatchException- If the input string cannot be converted into the proper type
-
-