Class TradeReport
- java.lang.Object
-
- com.opengamma.strata.report.trade.TradeReport
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTradeReport.BuilderThe bean-builder forTradeReport.static classTradeReport.MetaThe meta-bean forTradeReport.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TradeReport.Builderbuilder()Returns a builder used to create an instance of the bean.booleanequals(Object obj)ImmutableList<String>getColumnHeaders()Gets the report column headers.ImmutableList<TradeReportColumn>getColumns()Gets the report columns, which may contain information required for formatting.ImmutableTable<Integer,Integer,Result<?>>getData()Gets the calculation results.intgetRowCount()Gets the number of rows in the report table.InstantgetRunInstant()Gets the instant at which the report was run.LocalDategetValuationDate()Gets the valuation date.inthashCode()static TradeReport.Metameta()The meta-bean forTradeReport.TradeReport.MetametaBean()static TradeReportof(ReportCalculationResults calculationResults, TradeReportTemplate reportTemplate)Returns a new trade report.TradeReport.BuildertoBuilder()Returns a builder that allows this bean to be mutated.StringtoString()voidwriteAsciiTable(OutputStream out)Writes this report out as an ASCII table.voidwriteCsv(OutputStream out)Writes this report out in a CSV format.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.opengamma.strata.report.Report
getColumnCount, toAsciiTableString
-
-
-
-
Method Detail
-
of
public static TradeReport of(ReportCalculationResults calculationResults, TradeReportTemplate reportTemplate)
Returns a new trade report.- Parameters:
calculationResults- the results of the calculationsreportTemplate- the template used to generate the report- Returns:
- a new trade report
-
getRowCount
public int getRowCount()
Description copied from interface:ReportGets the number of rows in the report table.- Specified by:
getRowCountin interfaceReport- Returns:
- the number of rows in the report table
-
getColumnHeaders
public ImmutableList<String> getColumnHeaders()
Description copied from interface:ReportGets the report column headers.- Specified by:
getColumnHeadersin interfaceReport- Returns:
- the column headers
-
writeCsv
public void writeCsv(OutputStream out)
Description copied from interface:ReportWrites this report out in a CSV format.
-
writeAsciiTable
public void writeAsciiTable(OutputStream out)
Description copied from interface:ReportWrites this report out as an ASCII table.- Specified by:
writeAsciiTablein interfaceReport- Parameters:
out- the output stream to write to
-
meta
public static TradeReport.Meta meta()
The meta-bean forTradeReport.- Returns:
- the meta-bean, not null
-
builder
public static TradeReport.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public TradeReport.Meta metaBean()
- Specified by:
metaBeanin interfaceorg.joda.beans.Bean
-
getValuationDate
public LocalDate getValuationDate()
Gets the valuation date.- Specified by:
getValuationDatein interfaceReport- Returns:
- the value of the property, not null
-
getRunInstant
public Instant getRunInstant()
Gets the instant at which the report was run.- Specified by:
getRunInstantin interfaceReport- Returns:
- the value of the property, not null
-
getColumns
public ImmutableList<TradeReportColumn> getColumns()
Gets the report columns, which may contain information required for formatting.- Returns:
- the value of the property, not null
-
getData
public ImmutableTable<Integer,Integer,Result<?>> getData()
Gets the calculation results.- Returns:
- the value of the property, not null
-
toBuilder
public TradeReport.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-