Class MarketDataConfigBuilder


  • public final class MarketDataConfigBuilder
    extends Object
    A mutable builder for building an instance of MarketDataConfig.
    • Method Detail

      • add

        public MarketDataConfigBuilder add​(String name,
                                           Object value)
        Adds an item of configuration under the specified name.
        Parameters:
        name - the name of the configuration item
        value - the configuration item
        Returns:
        this builder
      • add

        public MarketDataConfigBuilder add​(TypedString<?> name,
                                           Object value)
        Adds an item of configuration under the specified name.
        Parameters:
        name - the name of the configuration item
        value - the configuration item
        Returns:
        this builder
      • addDefault

        public <T> MarketDataConfigBuilder addDefault​(T value)
        Adds an item of configuration that is the default of its type.

        There can only be one default item for each type.

        There is a class of configuration where there is always a one value shared between all calculations. An example is the configuration which specifies which market quote to use when building FX rates for a currency pair. All calculations use the same set of FX rates obtained from the same underlying market data.

        Type Parameters:
        T - the type used when looking up the configuration
        Parameters:
        value - the configuration value
        Returns:
        this builder