Class DataTools

java.lang.Object
edu.pitt.isp.sverchkov.data.DataTools

public class DataTools extends Object
Data tools.
Author:
YUS24
  • Field Details

  • Constructor Details

    • DataTools

      public DataTools()
  • Method Details

    • dataTableFromFile

      public static DataTable<String,String> dataTableFromFile(File file) throws FileNotFoundException
      Reads a data table from a file.
      Parameters:
      file - The file to read from
      Returns:
      The data table
      Throws:
      FileNotFoundException - if the file is not found
    • saveCSV

      public static <Attribute, Value> void saveCSV(DataTable<Attribute,Value> data, File dest, boolean headers) throws IOException
      Saves a data table to a file.
      Parameters:
      data - The data table to save
      dest - The file to save to
      headers - Whether to include headers
      Throws:
      IOException - if something goes wrong