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 Details

  • Method Details

    • convert

      public String convert​(List<T> value)
      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 interface CSVConverter<T>
      Parameters:
      value - the value of Type T to convert. May be null
      Returns:
      a String representation e.g. Object.toString()
    • parse

      public List<T> parse​(String value) throws CSVConversionException
      Description copied from interface: CSVConverter
      Parse a String value to retrieve an object of type T.
      Specified by:
      parse in interface CSVConverter<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.