Class CsvTableColumn
java.lang.Object
org.cloudsimplus.builders.tables.AbstractTableColumn
org.cloudsimplus.builders.tables.CsvTableColumn
- All Implemented Interfaces:
TableColumn
- Direct Known Subclasses:
MarkdownTableColumn,TextTableColumn
A column of an
CsvTable. The class generates the CSV code
that represents a column in the table.- Since:
- CloudSim Plus 1.0
- Author:
- Manoel Campos da Silva Filho
-
Constructor Summary
ConstructorsConstructorDescriptionCsvTableColumn(String title) CsvTableColumn(String title, String subTitle) CsvTableColumn(String title, String subTitle, String format) CsvTableColumn(Table table, String title) CsvTableColumn(Table table, String title, String subTitle) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringalignStringRight(String str) Align a string to the right side, based on the length of the title header of the column.static StringalignStringRight(String str, int length) Align a string to the right side, based on a given length.generateData(Object data) Generates the string that represents the data of the column, formatted according to theformat.protected StringgenerateHeader(String str) Generates a header for the column, either for the title or subtitle header.Methods inherited from class org.cloudsimplus.builders.tables.AbstractTableColumn
generateSubtitleHeader, generateTitleHeader, getIndex, isLastColumn, setFormat, setSubTitle, setTable, setTitle, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.cloudsimplus.builders.tables.TableColumn
getFormat, getSubTitle, getTable, getTitle
-
Constructor Details
-
CsvTableColumn
-
CsvTableColumn
-
CsvTableColumn
-
CsvTableColumn
-
CsvTableColumn
-
-
Method Details
-
generateHeader
Description copied from class:AbstractTableColumnGenerates a header for the column, either for the title or subtitle header.- Specified by:
generateHeaderin classAbstractTableColumn- Parameters:
str- header title or subtitle- Returns:
- the generated header string
-
generateData
Description copied from class:AbstractTableColumnGenerates the string that represents the data of the column, formatted according to theformat.- Specified by:
generateDatain interfaceTableColumn- Overrides:
generateDatain classAbstractTableColumn- Parameters:
data- the data of the column to be formatted- Returns:
- a string containing the formatted column data
-
alignStringRight
-
alignStringRight
-