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 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