public final class FunctionUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
duplicateResult(Measure existingKey,
Measure newKey,
Map<Measure,Result<?>> mutableMeasureMap)
Checks if a map of results contains a value for a key, and if it does inserts it into the map for a different key.
|
static Collector<CurrencyAmount,List<CurrencyAmount>,CurrencyScenarioArray> |
toCurrencyValuesArray()
Returns a collector that builds a single-currency scenerio result.
|
static Collector<MultiCurrencyAmount,List<MultiCurrencyAmount>,MultiCurrencyScenarioArray> |
toMultiCurrencyValuesArray()
Returns a collector that builds a multi-currency scenerio result.
|
static <T> Collector<T,List<T>,ScenarioArray<T>> |
toScenarioArray()
Returns a collector which can be used at the end of a stream of results to build a
ScenarioArray. |
static Collector<Double,List<Double>,DoubleScenarioArray> |
toValuesArray()
Returns a collector that builds a scenario result based on
Double. |
public static <T> Collector<T,List<T>,ScenarioArray<T>> toScenarioArray()
ScenarioArray.T - the type of the results in the streamCurrencyAmountList from a stream of CurrencyAmountpublic static Collector<MultiCurrencyAmount,List<MultiCurrencyAmount>,MultiCurrencyScenarioArray> toMultiCurrencyValuesArray()
This is used at the end of a stream to collect per-scenario instances of MultiCurrencyAmount
into a single instance of MultiCurrencyScenarioArray, which is designed to be space-efficient.
MultiCurrencyAmount
to build a MultiCurrencyScenarioArraypublic static Collector<CurrencyAmount,List<CurrencyAmount>,CurrencyScenarioArray> toCurrencyValuesArray()
This is used at the end of a stream to collect per-scenario instances of CurrencyAmount
into a single instance of CurrencyScenarioArray, which is designed to be space-efficient.
CurrencyAmount to build a CurrencyScenarioArraypublic static Collector<Double,List<Double>,DoubleScenarioArray> toValuesArray()
Double.
This is used at the end of a stream to collect per-scenario instances of Double
into a single instance of DoubleScenarioArray, which is designed to be space-efficient.
Note that DoubleStream does not support collectors, which makes this less efficient
than it should be.
Double to build a DoubleScenarioArraypublic static void duplicateResult(Measure existingKey, Measure newKey, Map<Measure,Result<?>> mutableMeasureMap)
existingKey - a key for which the map possibly contains a valuenewKey - the key which is inserted into the mapmutableMeasureMap - a mutable map of values, keyed by measureCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.