Package org.cloudsimplus.builders.tables
Interface Table
- All Known Implementing Classes:
AbstractTable
,CsvTable
,HtmlTable
,MarkdownTable
,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 TypeMethodDescriptionAdds a column with a given title to the end of the table's columns to be printed.addColumn
(int index, TableColumn column) Adds a column object to a specific position of the table's columns to be printed.Adds a column with a given to the end of the table's columns to be printed.Adds a column with a given title and sub-title to the end of the table's columns to be printed.addColumn
(TableColumn column) Adds a column object to the end of the table's columns to be printed.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.Gets the string used to separate one column from another (optional).getTitle()
newRow()
Adds a new row to the list of rows containing the data to be printed.void
print()
Prints the table.setColumnSeparator
(String columnSeparator) Sets the string used to separate one column from another (optional).
-
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:
-
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.
-