Class HistogramCSVGenerator

All Implemented Interfaces:
Generator<Histogram>, TransformingGenerator<Histogram,Histogram>, ElementWriter<Histogram>

public class HistogramCSVGenerator extends CSVGenerator<Histogram>
Writes a histogram to a CSV file.
Author:
Owen Feehan
  • Constructor Details

    • HistogramCSVGenerator

      public HistogramCSVGenerator()
  • Method Details

    • writeToFile

      public void writeToFile(Histogram element, OutputWriteSettings settings, Path filePath) throws OutputWriteFailedException
      Description copied from class: SingleFileTypeGenerator
      Write generated content for {code element} to the file filePath.

      This function deliberately leaves ambiguity over what occurs if a file already exists at filePath.

      Specified by:
      writeToFile in class SingleFileTypeGenerator<Histogram,Histogram>
      Parameters:
      element - element to be assigned and then transformed.
      settings - settings for outputting.
      filePath - the path to the file to write to.
      Throws:
      OutputWriteFailedException - if the content cannot be written successfully.
    • isIgnoreZeros

      public boolean isIgnoreZeros()
      Iff true bins in the histogram with a zero count are not written
    • setIgnoreZeros

      public void setIgnoreZeros(boolean ignoreZeros)
      Iff true bins in the histogram with a zero count are not written