Class DataTableType

java.lang.Object
io.cucumber.datatable.DataTableType

@API(status=STABLE) public final class DataTableType extends Object
A data table type describes how a data table should be represented as an object.
See Also:
  • Constructor Details

    • DataTableType

      public DataTableType(Type type, TableTransformer<T> transformer)
      Creates a data table type that transforms the whole table to a single object.
      Type Parameters:
      T - see type
      Parameters:
      type - the type of the object
      transformer - a function that creates an instance of type from the data table
    • DataTableType

      public DataTableType(Type type, TableRowTransformer<T> transformer)
      Creates a data table type that transforms the rows of the table into a list of objects.
      Type Parameters:
      T - see type
      Parameters:
      type - the type of the list items
      transformer - a function that creates an instance of type from the data table row
    • DataTableType

      public DataTableType(Type type, TableEntryTransformer<T> transformer)
      Creates a data table type that transforms the entries of the table into a list of objects. An entry consists of the elements of the table header paired with the values of each subsequent row.
      Type Parameters:
      T - see type
      Parameters:
      type - the type of the list items
      transformer - a function that creates an instance of type from the data table entry
    • DataTableType

      public DataTableType(Type type, TableCellTransformer<T> transformer)
      Creates a data table type that transforms the cells of the table into a list of list of objects.
      Type Parameters:
      T - see type
      Parameters:
      type - the type of the list of lists items
      transformer - a function that creates an instance of type from the data table cell
  • Method Details