/** * Obtains an instance containing a scenario market data value with data for multiple scenarios. * <p> * The market data is made up of multiple values, one for each scenario. * <p> * A box may be created that contains a value for one scenario. Such a box is distinct from * a box created using {@link #ofSingleValue(Object)}, which is valid for any number of scenarios. * * @param <T> the type of the market data value used in each scenario * @param scenarioValues the market data values for each scenario * @return a box containing a scenario market data value with data for multiple scenarios */ public static <T> MarketDataBox<T> ofScenarioValues(List<T> scenarioValues) { return ScenarioMarketDataBox.of(scenarioValues); }
/** * Obtains an instance containing a scenario market data value with data for multiple scenarios. * <p> * The market data is made up of multiple values, one for each scenario. * The {@link ScenarioArray} instance may provide optimized internal storage of these values. * <p> * A box may be created that contains a value for one scenario. Such a box is distinct from * a box created using {@link #ofSingleValue(Object)}, which is valid for any number of scenarios. * * @param <T> the type of the market data value used in each scenario * @param scenarioValue the market data value containing data for multiple scenarios * @return a box containing a scenario market data value with data for multiple scenarios */ public static <T> MarketDataBox<T> ofScenarioValue(ScenarioArray<T> scenarioValue) { return ScenarioMarketDataBox.of(scenarioValue); }
/** * Obtains an instance containing a scenario market data value with data for multiple scenarios. * <p> * The market data is made up of multiple values, one for each scenario. * <p> * A box may be created that contains a value for one scenario. Such a box is distinct from * a box created using {@link #ofSingleValue(Object)}, which is valid for any number of scenarios. * * @param <T> the type of the market data value used in each scenario * @param scenarioValues the market data values for each scenario * @return a box containing a scenario market data value with data for multiple scenarios */ @SafeVarargs public static <T> MarketDataBox<T> ofScenarioValues(T... scenarioValues) { return ScenarioMarketDataBox.of(scenarioValues); }