Class CsvTable
java.lang.Object
org.cloudsimplus.builders.tables.AbstractTable
org.cloudsimplus.builders.tables.CsvTable
- All Implemented Interfaces:
Table
- Direct Known Subclasses:
MarkdownTable,TextTable
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcreateHorizontalLine(boolean includeColSeparator) protected StringGets a string and returns a copy centralized along the table width.protected final intCretes a column with a given title, subtitle and format.voidCSV files don't have a table closing line.voidCSV files don't have a table opening line.voidCSV files don't have a title.protected StringReturns the string to close a row.protected StringCSV files don't have a row opening line.protected final StringstringRepeat(String str, int timesToRepeat) Returns a string repeated a given number of times.protected StringReturns the string that has to precede the subtitle head.Methods inherited from class org.cloudsimplus.builders.tables.AbstractTable
addColumn, addColumn, addColumnList, colCount, getRows, newColumn, newColumn, newRow, print, printColumnHeaders, setColumnSeparator, setTitleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cloudsimplus.builders.tables.Table
getColumns, getColumnSeparator, getTitle
-
Constructor Details
-
CsvTable
public CsvTable() -
CsvTable
-
-
Method Details
-
printTitle
public void printTitle()CSV files don't have a title.- Specified by:
printTitlein classAbstractTable
-
printTableOpening
public void printTableOpening()CSV files don't have a table opening line.- Specified by:
printTableOpeningin classAbstractTable
-
printTableClosing
public void printTableClosing()CSV files don't have a table closing line.- Specified by:
printTableClosingin classAbstractTable
-
rowOpening
CSV files don't have a row opening line.- Specified by:
rowOpeningin classAbstractTable- Returns:
-
rowClosing
Description copied from class:AbstractTableReturns the string to close a row.- Specified by:
rowClosingin classAbstractTable- Returns:
- the string to close a row
-
subtitleHeaderOpening
Description copied from class:AbstractTableReturns the string that has to precede the subtitle head.- Specified by:
subtitleHeaderOpeningin classAbstractTable- Returns:
- the string that has to precede the subtitle head
-
createHorizontalLine
- Returns:
- a horizontal line with the same width of the table
-
stringRepeat
-
getLengthOfColumnHeadersRow
protected final int getLengthOfColumnHeadersRow()- Returns:
- the number of characters of the column headers row
-
getCentralizedString
-
getLineSeparator
-
newColumn
Description copied from interface:TableCretes 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:
-