joptsimple.internal
Class ColumnarData
- java.lang.Object
-
- joptsimple.internal.ColumnarData
-
public class ColumnarData extends java.lang.ObjectA means to display data in a text grid.
-
-
Constructor Summary
Constructors Constructor and Description ColumnarData(java.lang.String... headers)Creates a new grid with the given column headers.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddRow(java.lang.Object... rowData)Adds a row to the grid.voidclear()Removes all data from the grid, but preserves the headers.java.lang.Stringformat()Gives a string that represents the data formatted in columns.
-
-
-
Constructor Detail
-
ColumnarData
public ColumnarData(java.lang.String... headers)
Creates a new grid with the given column headers.- Parameters:
headers- column headers
-
-
Method Detail
-
addRow
public void addRow(java.lang.Object... rowData)
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
-
format
public java.lang.String format()
Gives a string that represents the data formatted in columns.- Returns:
- the formatted grid
-
clear
public final void clear()
Removes all data from the grid, but preserves the headers.
-
-
DMelt 3.0 © DataMelt by jWork.ORG