Package org.cloudsimplus.builders.tables
Interface Table
- All Known Implementing Classes:
AbstractTable
,CsvTable
,HtmlTable
,TextTable
public interface Table
An interface for classes that generate tables from a given data set,
following the Builder Design Pattern.
- Since:
- CloudSim Plus 1.0
- Author:
- Manoel Campos da Silva Filho
-
Method Summary
Modifier and Type Method Description TableColumn
addColumn(int index, String columnTitle)
Adds a column with a given title to the end of the table's columns to be printed.TableColumn
addColumn(int index, TableColumn column)
Adds a column object to a specific position of the table's columns to be printed.TableColumn
addColumn(String columnTitle)
Adds a column with a given to the end of the table's columns to be printed.TableColumn
addColumn(String columnTitle, String columnSubTitle)
Adds a column with a given title and sub-title to the end of the table's columns to be printed.TableColumn
addColumn(TableColumn column)
Adds a column object to the end of the table's columns to be printed.Table
addColumnList(String... columnTitles)
Adds a list of columns (with given titles) to the end of the table's columns to be printed, where the column data will be printed without a specific format.List<TableColumn>
getColumns()
String
getColumnSeparator()
Gets the string used to separate one column from another (optional).String
getTitle()
List<Object>
newRow()
Adds a new row to the list of rows containing the data to be printed.void
print()
Prints the table.Table
setColumnSeparator(String columnSeparator)
Sets the string used to separate one column from another (optional).Table
setTitle(String title)
-
Method Details
-
newRow
Adds a new row to the list of rows containing the data to be printed.- Returns:
-
addColumn
Adds a column with a given to the end of the table's columns to be printed.- Parameters:
columnTitle
- The title of the column to be added.- Returns:
- The created column.
-
addColumn
Adds a column with a given title to the end of the table's columns to be printed.- Parameters:
index
- the position to insert the column into the column's listcolumnTitle
- The title of the column to be added.- Returns:
- the created column
-
addColumn
Adds a column with a given title and sub-title to the end of the table's columns to be printed.- Parameters:
columnTitle
- The title of the column to be added.columnSubTitle
- The sub-title of the column to be added.- Returns:
- the created column
-
addColumn
Adds a column object to a specific position of the table's columns to be printed.- Parameters:
index
- the position to insert the column into the column's listcolumn
- The column to be added.- Returns:
- the created column
-
addColumn
Adds a column object to the end of the table's columns to be printed.- Parameters:
column
- The column to be added.- Returns:
- the created column
-
addColumnList
Adds a list of columns (with given titles) to the end of the table's columns to be printed, where the column data will be printed without a specific format.- Parameters:
columnTitles
- The titles of the columns- Returns:
- the
Table
instance. - See Also:
addColumn(String)
-
getTitle
String getTitle()- Returns:
- the table title
-
setTitle
- Parameters:
title
- the table title to set- Returns:
- The Table instance
-
getColumns
List<TableColumn> getColumns()- Returns:
- the list of columns of the table
-
getColumnSeparator
String getColumnSeparator()Gets the string used to separate one column from another (optional).- Returns:
-
setColumnSeparator
Sets the string used to separate one column from another (optional).- Parameters:
columnSeparator
- the separator to set- Returns:
-
print
void print()Prints the table.
-