Class StaticTableDocument

All Implemented Interfaces:
IGenericDocument, ITableDocument, IEventSource

@Ser public class StaticTableDocument extends AbstractTableDocument
A simple table document. Such table document objects do not listen to unit changes events; in fact, they are unaware of the IUnit family of classes. They are ideal to distribute static, immutable contents. More complex table documents should implement ITableDocument and/or extend AbstractTableDocument.
  • Constructor Details

    • StaticTableDocument

      public StaticTableDocument(List<String> columnLabels, List<? extends ITableRow> rows)
      Create a static table document containing the provided rows.
      Parameters:
      columnLabels - cannot be null or empty
      rows - cannot be null
  • Method Details

    • getRowCount

      public int getRowCount()
      Description copied from interface: ITableDocument
      Get the number of rows in this table document.
      Returns:
      the number of rows
    • getColumnLabels

      public List<String> getColumnLabels()
      Description copied from interface: ITableDocument
      Get the column labels for this table document.
      Returns:
      the column labels
    • getTable

      public ITableDocumentPart getTable()
      Description copied from interface: ITableDocument
      Get the entire document.
      Returns:
      a part representing the entire document
    • getTablePart

      public ITableDocumentPart getTablePart(int start, int count)
      Description copied from interface: ITableDocument
      Get a part of the document.
      Parameters:
      start - starting row index
      count - number of rows to be returned
      Returns:
      the part