Package me.landmesser.simplecsv
Class ListConverter<T>
java.lang.Object
me.landmesser.simplecsv.ListConverter<T>
- All Implemented Interfaces:
CSVConverter<List<T>>
public class ListConverter<T> extends Object implements CSVConverter<List<T>>
-
Constructor Summary
Constructors Constructor Description ListConverter(Class<T> elemClass)
-
Method Summary
-
Constructor Details
-
Method Details
-
convert
Description copied from interface:CSVConverter
Convert a value to a String representation. It should be lossless, so that back conversion is possible without loss of information. However, this is not required.- Specified by:
convert
in interfaceCSVConverter<T>
- Parameters:
value
- the value of TypeT
to convert. May benull
- Returns:
- a String representation e.g.
Object.toString()
-
parse
Description copied from interface:CSVConverter
Parse a String value to retrieve an object of typeT
.- Specified by:
parse
in interfaceCSVConverter<T>
- Parameters:
value
- the String representation coming from a CSV file.- Returns:
- the converted object.
- Throws:
CSVConversionException
- if there is a problem while parsing the input, e.g. if the format is not recognized.
-