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.
      com.google.common.collect.ImmutableList<java.lang.String> getColumnHeaders()
      Gets the report column headers.
      int getRowCount()
      Gets the number of rows in the report table.
      java.time.Instant getRunInstant()
      Gets the instant at which the report was run, which is independent of the valuation date.
      java.time.LocalDate getValuationDate()
      Gets the valuation date of the results driving the report.
      default java.lang.String toAsciiTableString()
      Gets this report as an ASCII table string.
      void writeAsciiTable​(java.io.OutputStream out)
      Writes this report out as an ASCII table.
      void writeCsv​(java.io.OutputStream out)
      Writes this report out in a CSV format.
    • Method Detail

      • getValuationDate

        java.time.LocalDate getValuationDate()
        Gets the valuation date of the results driving the report.
        Returns:
        the valuation date
      • getRunInstant

        java.time.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

        com.google.common.collect.ImmutableList<java.lang.String> getColumnHeaders()
        Gets the report column headers.
        Returns:
        the column headers
      • writeCsv

        void writeCsv​(java.io.OutputStream out)
        Writes this report out in a CSV format.
        Parameters:
        out - the output stream to write to
      • writeAsciiTable

        void writeAsciiTable​(java.io.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 java.lang.String toAsciiTableString()
        Gets this report as an ASCII table string.
        Returns:
        the ASCII table string