public static double getFXMultiplier(final Object id, final double multiplier) {
if (id instanceof ExternalId) {
return getFXMultiplierFromExternalId((ExternalId) id, multiplier);
} else if (id instanceof ExternalIdBundle) {
final ExternalIdBundle bundle = (ExternalIdBundle) id;
if (bundle.getExternalId(ExternalSchemes.BLOOMBERG_TICKER) != null) {
return getFXMultiplierFromExternalId(bundle.getExternalId(ExternalSchemes.BLOOMBERG_TICKER), multiplier);
} else if (bundle.getExternalId(ExternalSchemes.BLOOMBERG_TICKER_WEAK) != null) {
return getFXMultiplierFromExternalId(bundle.getExternalId(ExternalSchemes.BLOOMBERG_TICKER_WEAK), multiplier);
}
} else if (id instanceof UniqueId) {
final UniqueId uid = (UniqueId) id;
return getFXMultiplierFromExternalId(ExternalId.of(ExternalSchemes.BLOOMBERG_TICKER, uid.getValue()), multiplier);
}