|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.tngtech.jgiven.DataTables
public class DataTables
A utility class to create data tables.
| Constructor Summary | |
|---|---|
DataTables()
|
|
| Method Summary | |
|---|---|
static java.lang.Iterable<? extends java.lang.Iterable<?>> |
table(int numberOfColumns,
java.lang.Object... data)
Creates a table, i.e. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataTables()
| Method Detail |
|---|
public static java.lang.Iterable<? extends java.lang.Iterable<?>> table(int numberOfColumns,
java.lang.Object... data)
numberOfColumns columns from the given data including the header.
Example:
table(2,
"name", "age", // header
"Peter", 20, // first row of data
"Susan", 35); // second row of data
numberOfColumns - the number of columns the resulting table should havedata - the data of the table represented as a one-dimensional list,
the number of entries must be a multiple of numberOfColumns.
The first numberOfColumns elements are taken as the header of the table,
the remaining values as data
data, but in a two-dimensional form
java.lang.IllegalArgumentException - if data.length % numberOfColumns != 0
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||