//JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET: //ORIGINAL LINE: @Override public com.google.common.collect.ImmutableSet<com.opengamma.strata.data.MarketDataId<?>> getVolatilityIds(com.opengamma.strata.basics.currency.CurrencyPair currencyPair) public ImmutableSet <MarketDataId <object> > getVolatilityIds(CurrencyPair currencyPair) { FxOptionVolatilitiesId id = volatilityIds.get(currencyPair); if (id == null) { throw new System.ArgumentException(msgPairNotFound(currencyPair)); } return(ImmutableSet.of(id)); }
//------------------------------------------------------------------------- public FxOptionVolatilities volatilities(CurrencyPair currencyPair, MarketData marketData) { FxOptionVolatilitiesId volatilityId = volatilityIds.get(currencyPair); if (volatilityId == null) { throw new MarketDataNotFoundException(msgPairNotFound(currencyPair)); } return(marketData.getValue(volatilityId)); }
//------------------------------------------------------------------------- /// <summary> /// Obtains an instance based on a single mapping from currency pair to volatility identifier. /// <para> /// The lookup provides volatilities for the specified currency pair. /// /// </para> /// </summary> /// <param name="currencyPair"> the currency pair </param> /// <param name="volatilityId"> the volatility identifier </param> /// <returns> the FX options lookup containing the specified mapping </returns> public static DefaultFxOptionMarketDataLookup of(CurrencyPair currencyPair, FxOptionVolatilitiesId volatilityId) { return(new DefaultFxOptionMarketDataLookup(ImmutableMap.of(currencyPair, volatilityId))); }