Class CsvTable

java.lang.Object
org.cloudsimplus.builders.tables.AbstractTable
org.cloudsimplus.builders.tables.CsvTable
All Implemented Interfaces:
Table
Direct Known Subclasses:
MarkdownTable, TextTable

public class CsvTable extends AbstractTable
Prints a table from a given data set, using a Comma Separated Text (CSV) format.
Since:
CloudSim Plus 1.0
Author:
Manoel Campos da Silva Filho
  • Constructor Details

    • CsvTable

      public CsvTable()
    • CsvTable

      public CsvTable(String title)
  • Method Details

    • printTitle

      public void printTitle()
      CSV files don't have a title.
      Specified by:
      printTitle in class AbstractTable
    • printTableOpening

      public void printTableOpening()
      CSV files don't have a table opening line.
      Specified by:
      printTableOpening in class AbstractTable
    • printTableClosing

      public void printTableClosing()
      CSV files don't have a table closing line.
      Specified by:
      printTableClosing in class AbstractTable
    • rowOpening

      protected String rowOpening()
      CSV files don't have a row opening line.
      Specified by:
      rowOpening in class AbstractTable
      Returns:
    • rowClosing

      protected String rowClosing()
      Description copied from class: AbstractTable
      Returns the string to close a row.
      Specified by:
      rowClosing in class AbstractTable
      Returns:
      the string to close a row
    • subtitleHeaderOpening

      protected String subtitleHeaderOpening()
      Description copied from class: AbstractTable
      Returns the string that has to precede the subtitle head.
      Specified by:
      subtitleHeaderOpening in class AbstractTable
      Returns:
      the string that has to precede the subtitle head
    • createHorizontalLine

      protected String createHorizontalLine(boolean includeColSeparator)
      Returns:
      a horizontal line with the same width of the table
    • stringRepeat

      protected final String stringRepeat(String str, int timesToRepeat)
      Returns a string repeated a given number of times.
      Parameters:
      str - the string to repeat
      timesToRepeat - the number of times to repeat the string
      Returns:
      a string repeated a given number of times
    • getLengthOfColumnHeadersRow

      protected final int getLengthOfColumnHeadersRow()
      Returns:
      the number of characters of the column headers row
    • getCentralizedString

      protected String getCentralizedString(String str)
      Gets a string and returns a copy centralized along the table width.
      Parameters:
      str - the string to be centralized
      Returns:
      the centralized version of the string
    • getLineSeparator

      public String getLineSeparator()
    • newColumn

      public TableColumn newColumn(String title, String subtitle, String format)
      Description copied from interface: Table
      Cretes a column with a given title, subtitle and format. The created column is not added to the table.
      Parameters:
      title - The title of the column to be added.
      subtitle - The subtitle of the column to be added.
      format - format to print the column data
      Returns:
      the created column
      See Also: