Package at.htl.timetableGenerator.output
Class CSVExporter
java.lang.Object
at.htl.timetableGenerator.output.CSVExporter
This class provides methods to export timetables to CSV files.
It can export multiple timetables to a single file or each timetable to a separate file.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidexportTimetablesToMultipleFiles(@NotNull Map<String, Timetable> timetables, @NotNull String directory) Exports multiple timetables to separate CSV files.static voidexportTimetablesToSingleFile(@NotNull Map<String, Timetable> timetables, @NotNull String stringPath) Exports multiple timetables to a single CSV file.static voidexportTimetableToFile(Timetable timetable, @NotNull String path) Exports a single timetable to a CSV file.
-
Constructor Details
-
CSVExporter
public CSVExporter()
-
-
Method Details
-
exportTimetableToFile
Exports a single timetable to a CSV file.- Parameters:
timetable- the timetable to exportpath- the path of the CSV file
-
exportTimetablesToSingleFile
public static void exportTimetablesToSingleFile(@NotNull @NotNull Map<String, Timetable> timetables, @NotNull @NotNull String stringPath) Exports multiple timetables to a single CSV file.- Parameters:
timetables- the map of timetable names to timetablesstringPath- the path of the CSV file- Throws:
ExportException- if there is an error exporting.
-
exportTimetablesToMultipleFiles
public static void exportTimetablesToMultipleFiles(@NotNull @NotNull Map<String, Timetable> timetables, @NotNull @NotNull String directory) Exports multiple timetables to separate CSV files.- Parameters:
timetables- the map of timetable names to timetablesdirectory- the directory to save the CSV files- Throws:
ExportException- if there is an error exporting.
-