Class CsvWriterUtils


  • public final class CsvWriterUtils
    extends Object
    Groups several utilities methods for CsvPlugins
    • Method Detail

      • writeAdjustablePayment

        public static void writeAdjustablePayment​(CsvOutput.CsvRowOutputWithHeaders csv,
                                                  AdjustablePayment adjustablePayment,
                                                  String amountField,
                                                  String currencyField,
                                                  String directionField,
                                                  String dateField,
                                                  String dateConventionField,
                                                  String dateCalendarField)
        Writes an AdjustablePayment object to CSV
        Parameters:
        csv - the csv row
        adjustablePayment - the adjustable payment
        amountField - the amount field
        currencyField - the currency field
        directionField - the direction field
        dateField - the date field
        dateConventionField - the date convention field
        dateCalendarField - the date calendar field
      • writeCurrencyAmount

        public static void writeCurrencyAmount​(CsvOutput.CsvRowOutputWithHeaders csv,
                                               CurrencyAmount ccyAmount,
                                               String amountField,
                                               String currencyField,
                                               String directionField)
        Writes a currency amount using the provided fields
        Parameters:
        csv - the csv row output
        ccyAmount - the currency amount to write
        amountField - the amount header
        currencyField - the currency header
        directionField - the direction header
      • writeZonedDateTime

        public static void writeZonedDateTime​(CsvOutput.CsvRowOutputWithHeaders csv,
                                              ZonedDateTime zonedDateTime,
                                              String dateField,
                                              String timeField,
                                              String zoneField)
        Writes a zoned date time using the provided field
        Parameters:
        csv - the csv row output
        zonedDateTime - the zoned date time object
        dateField - the date field
        timeField - the time field
        zoneField - the zone field
      • writeBarrier

        public static void writeBarrier​(CsvOutput.CsvRowOutputWithHeaders csv,
                                        Barrier barrier,
                                        LocalDate obsDate)
        Writes a Barrier object to CSV
        Parameters:
        csv - the csv row output
        barrier - the barrier
        obsDate - the barrier observation date
      • writeFxSingle

        public static void writeFxSingle​(CsvOutput.CsvRowOutputWithHeaders csv,
                                         String prefix,
                                         FxSingle product)
        Write the FxSingle to CSV
        Parameters:
        csv - the csv row output
        prefix - a prefix to use on leg headers (often far / near)
        product - the fx single
      • writeSwap

        public static void writeSwap​(CsvOutput.CsvRowOutputWithHeaders csv,
                                     Swap product)
        Write a Swap to CSV
        Parameters:
        csv - the csv row output
        product - the swap to write