Class RowFormatter

java.lang.Object
com.tngtech.jgiven.format.table.RowFormatter
Direct Known Subclasses:
FieldBasedRowFormatter, PlainRowFormatter

public abstract class RowFormatter extends Object
Formats the rows of a data table.
Since:
0.10.0
See Also:
  • Constructor Details

    • RowFormatter

      public RowFormatter()
  • Method Details

    • header

      public abstract List<String> header()
      Generates the header row of the data table
    • formatRow

      public abstract List<String> formatRow(Object object)
      Generates a single row of the data table for the given object. This method is called for each object of the input.
    • postProcess

      public List<List<String>> postProcess(List<List<String>> table)
      Allows for post processing the resulting data table. The default implementation just returns the provided list
      Parameters:
      table - the table that has been generated by calls to the header() and the formatRow(Object) methods
      Returns:
      a potentially new table or just the passed table