cucumber.table
Class DataTable

java.lang.Object
  extended by cucumber.table.DataTable

public class DataTable
extends Object


Constructor Summary
DataTable(List<gherkin.formatter.model.DataTableRow> gherkinRows, TableConverter tableConverter)
           
 
Method Summary
<T> List<T>
asList(Type listType)
           
static DataTable create(List<?> raw)
           
static DataTable create(List<?> raw, Locale locale, String... columnNames)
           
static DataTable create(List<?> raw, Locale locale, String dateFormat, String... columnNames)
           
static DataTable create(List<?> raw, String dateFormat, String... columnNames)
           
 void diff(DataTable other)
          Diffs this table with other.
 void diff(List<?> other)
          Diffs this table with other, which can be a List<List<String>> or a List<YourType>.
 List<gherkin.formatter.model.DataTableRow> getGherkinRows()
           
 List<List<String>> raw()
           
 String toString()
           
 DataTable toTable(List<?> raw, String... columnNames)
          Creates another table using the same Locale and DateFormat that was used to create this table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataTable

public DataTable(List<gherkin.formatter.model.DataTableRow> gherkinRows,
                 TableConverter tableConverter)
Method Detail

create

public static DataTable create(List<?> raw)

create

public static DataTable create(List<?> raw,
                               String dateFormat,
                               String... columnNames)

create

public static DataTable create(List<?> raw,
                               Locale locale,
                               String... columnNames)

create

public static DataTable create(List<?> raw,
                               Locale locale,
                               String dateFormat,
                               String... columnNames)

raw

public List<List<String>> raw()

asList

public <T> List<T> asList(Type listType)

toTable

public DataTable toTable(List<?> raw,
                         String... columnNames)
Creates another table using the same Locale and DateFormat that was used to create this table.

Parameters:
raw - a list of objects (Pojos)
columnNames - optional explicit header columns
Returns:

diff

public void diff(List<?> other)
          throws TableDiffException
Diffs this table with other, which can be a List<List<String>> or a List<YourType>.

Parameters:
other - the other table to diff with.
Throws:
TableDiffException - if the tables are different.

diff

public void diff(DataTable other)
          throws TableDiffException
Diffs this table with other.

Parameters:
other - the other table to diff with.
Throws:
TableDiffException - if the tables are different.

getGherkinRows

public List<gherkin.formatter.model.DataTableRow> getGherkinRows()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.