Package com.opengamma.strata.report
Interface Report
-
- All Known Implementing Classes:
CashFlowReport
,TradeReport
public interface Report
Represents a business report.A report is a transformation of calculation engine results for a specific purpose, for example a trade report on a list of trades, or a cashflow report on a single trade.
The report physically represents a table of data, with column headers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default int
getColumnCount()
Gets the number of columns in the report table.ImmutableList<String>
getColumnHeaders()
Gets the report column headers.int
getRowCount()
Gets the number of rows in the report table.Instant
getRunInstant()
Gets the instant at which the report was run, which is independent of the valuation date.LocalDate
getValuationDate()
Gets the valuation date of the results driving the report.default String
toAsciiTableString()
Gets this report as an ASCII table string.void
writeAsciiTable(OutputStream out)
Writes this report out as an ASCII table.void
writeCsv(OutputStream out)
Writes this report out in a CSV format.
-
-
-
Method Detail
-
getValuationDate
LocalDate getValuationDate()
Gets the valuation date of the results driving the report.- Returns:
- the valuation date
-
getRunInstant
Instant getRunInstant()
Gets the instant at which the report was run, which is independent of the valuation date.- Returns:
- the run instant
-
getRowCount
int getRowCount()
Gets the number of rows in the report table.- Returns:
- the number of rows in the report table
-
getColumnHeaders
ImmutableList<String> getColumnHeaders()
Gets the report column headers.- Returns:
- the column headers
-
writeCsv
void writeCsv(OutputStream out)
Writes this report out in a CSV format.- Parameters:
out
- the output stream to write to
-
writeAsciiTable
void writeAsciiTable(OutputStream out)
Writes this report out as an ASCII table.- Parameters:
out
- the output stream to write to
-
getColumnCount
default int getColumnCount()
Gets the number of columns in the report table.- Returns:
- the number of columns in the report table
-
toAsciiTableString
default String toAsciiTableString()
Gets this report as an ASCII table string.- Returns:
- the ASCII table string
-
-