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