Package inputOutput

Class CSVFileReader


public class CSVFileReader extends AbstractTrackingDataSource
This class reads in a 'CSV-file containing a variation of tools and coordinates of their position in a room. It files them, so the different variable can be allocated to each single tool
  • Constructor Details

    • CSVFileReader

      public CSVFileReader(Reader reader) throws IOException
      Constructs a CSVFileReader from a Reader object.
      Parameters:
      reader - The reader to use.
      Throws:
      IOException
    • CSVFileReader

      public CSVFileReader(String path) throws IOException
      Constructs a CSVFileReader by reading a file from the filesystem.
      Parameters:
      path - The path to read.
      Throws:
      IOException - If the file does not exist.
  • Method Details

    • getExceptionNumber

      public static int getExceptionNumber()
    • isRepeatModeOn

      public boolean isRepeatModeOn()
    • setRepeatMode

      public void setRepeatMode(boolean repeatMode)
    • getToolNames

      public List<String> getToolNames()
    • update

      public ArrayList<TempTool> update()
      this returns an ArrayList containing as many tools as are listed in the CSV-file: when the CSV-file contains two tools then the method returns an ArrayList containing the objects of two tools
      Specified by:
      update in class AbstractTrackingDataSource
      Returns:
      ArrayList of tools
    • closeConnection

      public void closeConnection()
      Specified by:
      closeConnection in class AbstractTrackingDataSource
    • stopUpdate

      public void stopUpdate()
      TODO interrupt update loop without closing app completely