Package microsim.data
Class ExportCSV
java.lang.Object
microsim.data.ExportCSV
ExportCSV class allows the exporting of data to .csv files. This is a useful alternative to exporting to an output database, as it is faster and produces
separate files for each class of object. Note that only numbers, enums or strings are exported to .csv files.
- Author:
- Ross Richardson
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidExport data to the .csv files named after the class of the target object (or if a collection of objects, the class of the collection's members).
-
Field Details
-
autoincrementSeed
-
directory
-
-
Constructor Details
-
ExportCSV
Allows the exporting of all fields (including private and inherited fields) of an object to a .csv file named after the object's class name. Note that only numbers, enums or strings are exported to .csv files. The serialVersionUID of a class will also not be exported.- Parameters:
target- - the object whose fields will be exported to a .csv file with a name equal to the object's class name. If the target is a Collection of objects, each member of the collection will have their individual fields exported to the .csv file, labelled by their id.
-
-
Method Details
-
dumpToCSV
public void dumpToCSV()Export data to the .csv files named after the class of the target object (or if a collection of objects, the class of the collection's members). Note that only numbers, enums or strings are exported to .csv files.
-