Package com.tngtech.jgiven.format.table
Class RowFormatter
- java.lang.Object
-
- com.tngtech.jgiven.format.table.RowFormatter
-
- Direct Known Subclasses:
FieldBasedRowFormatter
,PlainRowFormatter
public abstract class RowFormatter extends java.lang.Object
Formats the rows of a data table.- Since:
- 0.10.0
- See Also:
Table
-
-
Constructor Summary
Constructors Constructor Description RowFormatter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.util.List<java.lang.String>
formatRow(java.lang.Object object)
Generates a single row of the data table for the given object.abstract java.util.List<java.lang.String>
header()
Generates the header row of the data tablejava.util.List<java.util.List<java.lang.String>>
postProcess(java.util.List<java.util.List<java.lang.String>> table)
Allows for post processing the resulting data table.
-
-
-
Method Detail
-
header
public abstract java.util.List<java.lang.String> header()
Generates the header row of the data table
-
formatRow
public abstract java.util.List<java.lang.String> formatRow(java.lang.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 java.util.List<java.util.List<java.lang.String>> postProcess(java.util.List<java.util.List<java.lang.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 theheader()
and theformatRow(Object)
methods- Returns:
- a potentially new table or just the passed table
-
-