/// <summary> /// Converts this column to a column header. /// <para> /// The header is a reduced form of the column used in <seealso cref="Results"/>. /// /// </para> /// </summary> /// <returns> the column header </returns> public ColumnHeader toHeader() { if (measure.CurrencyConvertible) { ReportingCurrency reportingCurrency = ReportingCurrency.orElse(ReportingCurrency.NATURAL); if (reportingCurrency.Specific) { return(ColumnHeader.of(name, measure, reportingCurrency.Currency)); } } return(ColumnHeader.of(name, measure)); }
//------------------------------------------------------------------------- /// <summary> /// Combines the parameters with another reporting currency and set of parameters. /// </summary> /// <param name="reportingCurrency"> the default reporting currency </param> /// <param name="defaultParameters"> the default parameters </param> /// <returns> the combined column </returns> public Column combineWithDefaults(ReportingCurrency reportingCurrency, CalculationParameters defaultParameters) { CalculationParameters combinedParams = parameters.combinedWith(defaultParameters); return(new Column(name, measure, ReportingCurrency.orElse(reportingCurrency), combinedParams)); }