Beispiel #1
0
        /// <summary>
        /// Applies an operation to the currency amounts.
        /// <para>
        /// The operator is called once for each currency in this amount.
        /// The operator may return an amount with a different currency.
        /// The result will be the total of the altered amounts.
        ///
        /// </para>
        /// </summary>
        /// <param name="operator">  the operator to be applied to the amounts </param>
        /// <returns> a copy of this amount with the mapping applied to the original amounts </returns>
        public MultiCurrencyAmount mapCurrencyAmounts(System.Func <CurrencyAmount, CurrencyAmount> @operator)
        {
            ArgChecker.notNull(@operator, "operator");
//JAVA TO C# CONVERTER TODO TASK: Most Java stream collectors are not converted by Java to C# Converter:
            return(amounts.Select(ca => @operator(ca)).collect(MultiCurrencyAmount.toMultiCurrencyAmount()));
        }