Class ImmutableRatesProviderBuilder


  • public final class ImmutableRatesProviderBuilder
    extends java.lang.Object
    Builder for the immutable rates provider.
    See Also:
    ImmutableRatesProvider
    • Method Detail

      • discountCurve

        public ImmutableRatesProviderBuilder discountCurve​(Currency currency,
                                                           Curve discountCurve)
        Adds a discount curve to the provider.

        This adds the specified discount curve to the provider. This operates using Map.put(Object, Object) semantics using the currency as the key.

        Parameters:
        currency - the currency of the curve
        discountCurve - the discount curve
        Returns:
        this, for chaining
      • discountCurves

        public ImmutableRatesProviderBuilder discountCurves​(java.util.Map<Currency,​? extends Curve> discountCurves)
        Adds discount curves to the provider.

        This adds the specified discount curves to the provider. This operates using Map.putAll(Map) semantics using the currency as the key.

        Parameters:
        discountCurves - the discount curves
        Returns:
        this, for chaining
      • iborIndexCurve

        public ImmutableRatesProviderBuilder iborIndexCurve​(IborIndex index,
                                                            Curve forwardCurve)
        Adds an Ibor index forward curve to the provider.

        This adds the specified forward curve to the provider. This operates using Map.put(Object, Object) semantics using the index as the key.

        Parameters:
        index - the index of the curve
        forwardCurve - the Ibor index forward curve
        Returns:
        this, for chaining
      • iborIndexCurve

        public ImmutableRatesProviderBuilder iborIndexCurve​(IborIndex index,
                                                            Curve forwardCurve,
                                                            LocalDateDoubleTimeSeries timeSeries)
        Adds an Ibor index forward curve to the provider with associated time-series.

        This adds the specified forward curve and time-series to the provider. This operates using Map.put(Object, Object) semantics using the index as the key.

        Parameters:
        index - the index of the curve
        forwardCurve - the index forward curve
        timeSeries - the associated time-series
        Returns:
        this, for chaining
      • overnightIndexCurve

        public ImmutableRatesProviderBuilder overnightIndexCurve​(OvernightIndex index,
                                                                 Curve forwardCurve)
        Adds an Overnight index forward curve to the provider.

        This adds the specified forward curve to the provider. This operates using Map.put(Object, Object) semantics using the index as the key.

        Parameters:
        index - the index of the curve
        forwardCurve - the Overnight index forward curve
        Returns:
        this, for chaining
      • overnightIndexCurve

        public ImmutableRatesProviderBuilder overnightIndexCurve​(OvernightIndex index,
                                                                 Curve forwardCurve,
                                                                 LocalDateDoubleTimeSeries timeSeries)
        Adds an Overnight index forward curve to the provider with associated time-series.

        This adds the specified forward curve and time-series to the provider. This operates using Map.put(Object, Object) semantics using the index as the key.

        Parameters:
        index - the index of the curve
        forwardCurve - the index forward curve
        timeSeries - the associated time-series
        Returns:
        this, for chaining
      • priceIndexCurve

        public ImmutableRatesProviderBuilder priceIndexCurve​(PriceIndex index,
                                                             Curve forwardCurve)
        Adds a Price index forward curve to the provider.

        This adds the specified forward curve to the provider. This operates using Map.put(Object, Object) semantics using the index as the key.

        Parameters:
        index - the index of the curve
        forwardCurve - the Price index forward curve
        Returns:
        this, for chaining
      • priceIndexCurve

        public ImmutableRatesProviderBuilder priceIndexCurve​(PriceIndex index,
                                                             Curve forwardCurve,
                                                             LocalDateDoubleTimeSeries timeSeries)
        Adds an index forward curve to the provider with associated time-series.

        This adds the specified forward curve and time-series to the provider. This operates using Map.put(Object, Object) semantics using the index as the key.

        Parameters:
        index - the index of the curve
        forwardCurve - the index forward curve
        timeSeries - the associated time-series
        Returns:
        this, for chaining
      • indexCurve

        public ImmutableRatesProviderBuilder indexCurve​(Index index,
                                                        Curve forwardCurve)
        Adds an index forward curve to the provider.

        This adds the specified forward curve to the provider. This is used for Ibor, Overnight and Price indices. This operates using Map.put(Object, Object) semantics using the index as the key.

        Parameters:
        index - the index of the curve
        forwardCurve - the Ibor index forward curve
        Returns:
        this, for chaining
      • indexCurve

        public ImmutableRatesProviderBuilder indexCurve​(Index index,
                                                        Curve forwardCurve,
                                                        LocalDateDoubleTimeSeries timeSeries)
        Adds an index forward curve to the provider with associated time-series.

        This adds the specified forward curve to the provider. This is used for Ibor, Overnight and Price indices. This operates using Map.put(Object, Object) semantics using the index as the key.

        Parameters:
        index - the index of the curve
        forwardCurve - the Ibor index forward curve
        timeSeries - the time-series
        Returns:
        this, for chaining
      • indexCurves

        public ImmutableRatesProviderBuilder indexCurves​(java.util.Map<? extends Index,​? extends Curve> indexCurves)
        Adds index forward curves to the provider with associated time-series.

        This adds the specified index forward curves to the provider. This is used for Ibor, Overnight and Price indices. This operates using Map.putAll(Map) semantics using the index as the key.

        Parameters:
        indexCurves - the index forward curves
        Returns:
        this, for chaining
      • indexCurves

        public ImmutableRatesProviderBuilder indexCurves​(java.util.Map<? extends Index,​? extends Curve> indexCurves,
                                                         java.util.Map<? extends Index,​LocalDateDoubleTimeSeries> timeSeries)
        Adds index forward curves to the provider with associated time-series.

        This adds the specified index forward curves to the provider. This is used for Ibor, Overnight and Price indices. This operates using Map.putAll(Map) semantics using the index as the key.

        Parameters:
        indexCurves - the index forward curves
        timeSeries - the associated time-series
        Returns:
        this, for chaining
      • timeSeries

        public ImmutableRatesProviderBuilder timeSeries​(Index index,
                                                        LocalDateDoubleTimeSeries timeSeries)
        Adds a time-series to the provider.

        This adds the specified time-series to the provider. This operates using Map.put(Object, Object) semantics using the index as the key.

        Parameters:
        index - the FX index
        timeSeries - the FX index time-series
        Returns:
        this, for chaining
      • timeSeries

        public ImmutableRatesProviderBuilder timeSeries​(java.util.Map<? extends Index,​LocalDateDoubleTimeSeries> timeSeries)
        Adds time-series to the provider.

        This adds the specified time-series to the provider. This operates using Map.putAll(Map) semantics using the index as the key.

        Parameters:
        timeSeries - the FX index time-series
        Returns:
        this, for chaining
      • build

        public ImmutableRatesProvider build()
        Completes the builder, returning the provider.
        Returns:
        the provider