/** * Obtains an instance representing the FX rate for a currency pair, specifying the source. * * @param currencyPair a currency pair * @param observableSource the source of the observable market data used to create the rate * @return an ID for the FX rate for the currency pair */ public static FxRateId of(CurrencyPair currencyPair, ObservableSource observableSource) { return new FxRateId(currencyPair, observableSource); }
/** * Obtains an instance representing the FX rate for a currency pair. * * @param currencyPair a currency pair * @return an ID for the FX rate for the currency pair */ public static FxRateId of(CurrencyPair currencyPair) { return new FxRateId(currencyPair, ObservableSource.NONE); }
/** * Obtains an instance representing the FX rate for a currency pair, specifying the source. * * @param base the base currency of the pair * @param counter the counter currency of the pair * @param observableSource the source of the observable market data used to create the rate * @return an ID for the FX rate for the currency pair */ public static FxRateId of(Currency base, Currency counter, ObservableSource observableSource) { return new FxRateId(CurrencyPair.of(base, counter), observableSource); }
/** * Obtains an instance representing the FX rate for a currency pair. * * @param base the base currency of the pair * @param counter the counter currency of the pair * @return an ID for the FX rate for the currency pair */ public static FxRateId of(Currency base, Currency counter) { return new FxRateId(CurrencyPair.of(base, counter), ObservableSource.NONE); }