Class TradeReportFormatter
- java.lang.Object
-
- com.opengamma.strata.report.framework.format.ReportFormatter<TradeReport>
-
- com.opengamma.strata.report.trade.TradeReportFormatter
-
public final class TradeReportFormatter extends ReportFormatter<TradeReport>
Formatter for trade reports.
-
-
Field Summary
Fields Modifier and Type Field Description static TradeReportFormatterINSTANCEThe single shared instance of this report formatter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringformatData(TradeReport report, int rowIdx, int colIdx, ReportOutputFormat format)Formats a piece of data for display.protected List<Class<?>>getColumnTypes(TradeReport report)Gets the type of the data in each report column.-
Methods inherited from class com.opengamma.strata.report.framework.format.ReportFormatter
formatValue, writeAsciiTable, writeCsv
-
-
-
-
Field Detail
-
INSTANCE
public static final TradeReportFormatter INSTANCE
The single shared instance of this report formatter.
-
-
Method Detail
-
getColumnTypes
protected List<Class<?>> getColumnTypes(TradeReport report)
Description copied from class:ReportFormatterGets the type of the data in each report column.If every value in a column is a failure the type will be
Object.class.- Specified by:
getColumnTypesin classReportFormatter<TradeReport>- Parameters:
report- the report- Returns:
- a list of column types
-
formatData
protected String formatData(TradeReport report, int rowIdx, int colIdx, ReportOutputFormat format)
Description copied from class:ReportFormatterFormats a piece of data for display.- Specified by:
formatDatain classReportFormatter<TradeReport>- Parameters:
report- the report containing the datarowIdx- the row index of the datacolIdx- the column index of the dataformat- the report output format- Returns:
- the formatted data
-
-