Exemplo n.º 1
0
 /// <summary>
 /// Returns an instance containing the values from the list of amounts.
 /// </summary>
 /// <param name="amounts">  the amounts, one for each scenario </param>
 /// <returns> an instance containing the values from the list of amounts </returns>
 public static MultiCurrencyScenarioArray of(IList <MultiCurrencyAmount> amounts)
 {
     return(new MultiCurrencyScenarioArray(MultiCurrencyAmountArray.of(amounts)));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Obtains an instance using a function to create the entries.
 /// <para>
 /// The function is passed the scenario index and returns the value for that index.
 ///
 /// </para>
 /// </summary>
 /// <param name="size">  the number of elements </param>
 /// <param name="amountFunction">  the function used to obtain each amount </param>
 /// <returns> an instance initialized using the function </returns>
 /// <exception cref="IllegalArgumentException"> is size is zero or less </exception>
 public static MultiCurrencyScenarioArray of(int size, System.Func <int, MultiCurrencyAmount> amountFunction)
 {
     return(new MultiCurrencyScenarioArray(MultiCurrencyAmountArray.of(size, amountFunction)));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Returns an instance containing the values from a map of amounts with the same number of elements in each array.
 /// </summary>
 /// <param name="values">  map of currencies to values </param>
 /// <returns> an instance containing the values from the map </returns>
 public static MultiCurrencyScenarioArray of(IDictionary <Currency, DoubleArray> values)
 {
     return(new MultiCurrencyScenarioArray(MultiCurrencyAmountArray.of(values)));
 }