Package com.complexible.common.timer

# Class TableData

java.lang.Object
com.complexible.common.timer.TableData

public class TableData extends Object
Create a table data structure that has a list of column names and list of data rows. The only function of this class is to print the data in a table format. Data can be given at once by the constructor or can be added incrementally with the addRow function.

Since:
  2.0
Version:
  2.0
Author:
  Evren Sirin

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TableData(String[] colNames)`
  `TableData(Collection data, List colNames)`
  `TableData(List colNames)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add(List row)`
  `int`
  `getColCount()`
  `int`
  `getRowCount()`
  `void`
  `print(OutputStream writer)`
  `void`
  `print(PrintWriter out)`
  `void`
  `print(Writer writer)`
  `void`
  `setAlignment(boolean[] rightAligned)`
  `void`
  `setrightAligned(int colIndex, boolean rightAligned)`
  `void`
  `sort(int col)`
  `void`
  `sort(int col, Comparator c)`
  `void`
  `sort(String colName)`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### TableData

    public TableData(Collection data, List colNames)

  - ### TableData

    public TableData(List colNames)

  - ### TableData

    public TableData(String[] colNames)

- ## Method Details

  - ### setAlignment

    public void setAlignment(boolean[] rightAligned)

  - ### setrightAligned

    public void setrightAligned(int colIndex, boolean rightAligned)

  - ### add

    public void add(List row)

  - ### print

    public void print(OutputStream writer)

  - ### print

    public void print(PrintWriter out)

  - ### print

    public void print(Writer writer)

  - ### getRowCount

    public int getRowCount()

  - ### getColCount

    public int getColCount()

  - ### sort

    public void sort(String colName)

  - ### sort

    public void sort(int col)

  - ### sort

    public void sort(int col, Comparator c)

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`