Package com.opencsv.bean
Class ConverterUUID
java.lang.Object
com.opencsv.bean.AbstractCsvConverter
com.opencsv.bean.ConverterUUID
- All Implemented Interfaces:
CsvConverter
This class converts an String to a
UUID
instance.- Since:
- 5.4
-
Field Summary
FieldsFields inherited from class com.opencsv.bean.AbstractCsvConverter
errorLocale, locale, type, writeLocale
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToRead
(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 Details
-
UUID_REGEX_PATTERN
- See Also:
-
-
Constructor Details
-
ConverterUUID
Initializes the class.- Parameters:
errorLocale
- The locale to use for error messages
-
-
Method Details
-
convertToRead
Description copied from interface:CsvConverter
Method 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
Object
representing the input data converted into the proper type - Throws:
CsvDataTypeMismatchException
- If the input string cannot be converted into the proper type
-