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, java.lang.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​(java.lang.String columnTitle)
    Adds a column with a given to the end of the table's columns to be printed.
    TableColumn addColumn​(java.lang.String columnTitle, java.lang.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​(java.lang.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.
    java.util.List<TableColumn> getColumns()  
    java.lang.String getColumnSeparator()
    Gets the string used to separate one column from another (optional).
    java.lang.String getTitle()  
    java.util.List<java.lang.Object> newRow()
    Adds a new row to the list of rows containing the data to be printed.
    void print()
    Prints the table.
    Table setColumnSeparator​(java.lang.String columnSeparator)
    Sets the string used to separate one column from another (optional).
    Table setTitle​(java.lang.String title)  
  • Method Details

    • newRow

      java.util.List<java.lang.Object> newRow()
      Adds a new row to the list of rows containing the data to be printed.
      Returns:
    • addColumn

      TableColumn addColumn​(java.lang.String columnTitle)
      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

      TableColumn addColumn​(int index, java.lang.String columnTitle)
      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 list
      columnTitle - The title of the column to be added.
      Returns:
      the created column
    • addColumn

      TableColumn addColumn​(java.lang.String columnTitle, java.lang.String columnSubTitle)
      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

      TableColumn addColumn​(int index, TableColumn column)
      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 list
      column - The column to be added.
      Returns:
      the created column
    • addColumn

      TableColumn addColumn​(TableColumn column)
      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

      Table addColumnList​(java.lang.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.
      Parameters:
      columnTitles - The titles of the columns
      Returns:
      the Table instance.
      See Also:
      addColumn(String)
    • getTitle

      java.lang.String getTitle()
      Returns:
      the table title
    • setTitle

      Table setTitle​(java.lang.String title)
      Parameters:
      title - the table title to set
      Returns:
      The Table instance
    • getColumns

      java.util.List<TableColumn> getColumns()
      Returns:
      the list of columns of the table
    • getColumnSeparator

      java.lang.String getColumnSeparator()
      Gets the string used to separate one column from another (optional).
      Returns:
    • setColumnSeparator

      Table setColumnSeparator​(java.lang.String columnSeparator)
      Sets the string used to separate one column from another (optional).
      Parameters:
      columnSeparator - the separator to set
      Returns:
    • print

      void print()
      Prints the table.