Class AbstractTableColumn
java.lang.Object
org.cloudsimplus.builders.tables.AbstractTableColumn
- All Implemented Interfaces:
TableColumn
- Direct Known Subclasses:
CsvTableColumn,HtmlTableColumn,LatexTableColumn
An abstract column of a table to be generated using a
Table class.- Author:
- Manoel Campos da Silva Filho
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractTableColumn(String title, String subTitle) Creates a column with a specific title and subtitle.AbstractTableColumn(String title, String subTitle, String format) Creates a column with a specific title, subtitle and format.AbstractTableColumn(Table table, String title) Creates a column with a specific title.AbstractTableColumn(Table table, String title, String subTitle) Creates a column with a specific title and subtitle for a given table. -
Method Summary
Modifier and TypeMethodDescriptiongenerateData(Object data) Generates the string that represents the data of the column, formatted according to theformat.protected abstract StringgenerateHeader(String str) Generates a header for the column, either for the title or subtitle header.Generates the string that represents the sub-header of the column (if any), containing the column subtitle.Generates the string that represents the header of the column, containing the column title.intgetIndex()Returns the index of the column into the table.protected booleanIndicates if the current column is the last one in the column list of theTable.final AbstractTableColumnSets the format to print the column data.setSubTitle(String subTitle) Sets the subtitle of the table (optional).Sets the table this column belongs to.Sets the title of the table (optional).toString()Methods 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
-
AbstractTableColumn
-
AbstractTableColumn
-
AbstractTableColumn
-
AbstractTableColumn
-
-
Method Details
-
setTitle
Description copied from interface:TableColumnSets the title of the table (optional).- Specified by:
setTitlein interfaceTableColumn- Parameters:
title- the title to set- Returns:
- this column
-
setSubTitle
Description copied from interface:TableColumnSets the subtitle of the table (optional).- Specified by:
setSubTitlein interfaceTableColumn- Parameters:
subTitle- the subtitle to set- Returns:
- this column
-
setFormat
Description copied from interface:TableColumnSets the format to print the column data.- Specified by:
setFormatin interfaceTableColumn- Parameters:
format- the format to set- Returns:
- this column
-
toString
-
setTable
Description copied from interface:TableColumnSets the table this column belongs to.- Specified by:
setTablein interfaceTableColumn- Parameters:
table- the table to set- Returns:
- this column
-
generateData
Generates the string that represents the data of the column, formatted according to theformat.- Specified by:
generateDatain interfaceTableColumn- Parameters:
data- the data of the column to be formatted- Returns:
- a string containing the formatted column data
-
generateHeader
-
generateTitleHeader
Description copied from interface:TableColumnGenerates the string that represents the header of the column, containing the column title.- Specified by:
generateTitleHeaderin interfaceTableColumn- Returns:
- the generated header string
-
generateSubtitleHeader
Description copied from interface:TableColumnGenerates the string that represents the sub-header of the column (if any), containing the column subtitle.- Specified by:
generateSubtitleHeaderin interfaceTableColumn- Returns:
- the generated sub-header string
-
getIndex
public int getIndex()Description copied from interface:TableColumnReturns the index of the column into the table.- Specified by:
getIndexin interfaceTableColumn- Returns:
- the index of the column into the table
-
isLastColumn
protected boolean isLastColumn()Indicates if the current column is the last one in the column list of theTable.- Returns:
- true if it is the last column, false otherwise.
-