Package cambio.simulator.export
Interface CSVData
public interface CSVData
Provides methods for direct conversion to the csv format. It is best used in pure dataclasses since all fields of an
implementing object will be extracted to the csv string.
Default implementation can be overwritten if needed. For consistency reasons this is not recommended.
- Author:
- Lion Wagner
-
Method Details
-
toCSVData
Converts this object to csv data. Uses a comma for separation.- Returns:
- a string, containing this objects data.
-
toCSVData
Converts this object to csv data. Uses the provided separator.- Parameters:
sep
- the char that should be used as separator- Returns:
- a string, containing this objects data.
-
toCSVHeader
Gets the csv header for this object. Values are separated by a comma.- Returns:
- a comma-separated string, containing the names of all fields of this object
-
toCSVHeader
Gets the csv header for this object. Values are separated by the provided separator.- Returns:
- a character-separated string, containing the names of all fields of this object
-