| java.lang.Object joptsimple.util.ColumnarData
ColumnarData | public class ColumnarData (Code) | | A means to display data in a text grid.
since: 2.1 author: Paul Holser version: $Id: ColumnarData.java,v 1.7 2007/04/10 20:06:27 pholser Exp $ |
Constructor Summary | |
public | ColumnarData(String[] headers) Creates a new grid with the given column headers. |
Method Summary | |
public void | addRow(Object[] rowData) Adds a row to the grid. | final public void | clear() Removes all data from the grid, but preserves the headers. | public String | format() Gives a string that represents the data formatted in columns. |
ColumnarData | public ColumnarData(String[] headers)(Code) | | Creates a new grid with the given column headers.
Parameters: headers - column headers |
addRow | public void addRow(Object[] rowData)(Code) | | Adds a row to the grid. The data will fall under the corresponding headers.
There can be fewer elements in the row than headers. Any data in columns outside
of the number of headers will not be added to the grid.
Parameters: rowData - row data to add |
clear | final public void clear()(Code) | | Removes all data from the grid, but preserves the headers.
|
format | public String format()(Code) | | Gives a string that represents the data formatted in columns.
the formatted grid |
|
|