org.springframework.yarn.support.console
Class Table

java.lang.Object
  extended by org.springframework.yarn.support.console.Table

public class Table
extends Object

Provide a basic concept of a table structure containing a map of column headers and a collection of rows. Used to render text-based tables (console output).

Author:
Gunnar Hillert, Janne Valkealahti
See Also:
UiUtils

Constructor Summary
Table()
           
 
Method Summary
 Table addHeader(Integer columnIndex, TableHeader tableHeader)
           
 void calculateColumnWidths()
           
 Map<Integer,TableHeader> getHeaders()
           
 List<TableRow> getRows()
           
 TableRow newRow()
          Add a new empty row to the table.
 void setRows(List<TableRow> rows)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Table

public Table()
Method Detail

getRows

public List<TableRow> getRows()

setRows

public void setRows(List<TableRow> rows)

getHeaders

public Map<Integer,TableHeader> getHeaders()

addHeader

public Table addHeader(Integer columnIndex,
                       TableHeader tableHeader)

newRow

public TableRow newRow()
Add a new empty row to the table.

Returns:
the newly created row, which can be then be populated

toString

public String toString()
Overrides:
toString in class Object

calculateColumnWidths

public void calculateColumnWidths()