Exemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @ImmutableDefaults private static void applyDefaults(Builder builder)
        private static void applyDefaults(Builder builder)
        {
            builder.parameters(CalculationParameters.empty());
        }
Exemplo n.º 2
0
        //-------------------------------------------------------------------------
        /// <summary>
        /// Obtains an instance that will calculate the specified measure.
        /// <para>
        /// The column name will be the same as the name of the measure.
        /// No calculation parameters are provided, thus the parameters from <seealso cref="CalculationRules"/> will be used.
        /// Currency conversion is controlled by the reporting currency in {@code CalculationRules}.
        ///
        /// </para>
        /// </summary>
        /// <param name="measure">  the measure to be calculated </param>
        /// <returns> a column with the specified measure </returns>
        public static Column of(Measure measure)
        {
            ColumnName name = ColumnName.of(measure);

            return(new Column(name, measure, null, CalculationParameters.empty()));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Obtains an instance that will calculate the specified measure, converting to the specified currency.
        /// <para>
        /// The specified currency will be wrapped in <seealso cref="ReportingCurrency"/> and added to the calculation parameters.
        ///
        /// </para>
        /// </summary>
        /// <param name="measure">  the measure to be calculated </param>
        /// <param name="columnName">  the column name </param>
        /// <param name="currency">  the currency to convert to </param>
        /// <returns> a column with the specified measure </returns>
        public static Column of(Measure measure, string columnName, Currency currency)
        {
            ColumnName name = ColumnName.of(columnName);

            return(new Column(name, measure, ReportingCurrency.of(currency), CalculationParameters.empty()));
        }