} else if (value instanceof InflationSensitivity) {
final InflationSensitivity previousSensitivity = (InflationSensitivity) currentTotal;
final InflationSensitivity currentSensitivity = (InflationSensitivity) value;
return previousSensitivity.plus(currentSensitivity);
} else if (value instanceof MultipleCurrencyInflationSensitivity) {
final MultipleCurrencyInflationSensitivity previousSensitivity = (MultipleCurrencyInflationSensitivity) currentTotal;
final MultipleCurrencyInflationSensitivity currentSensitivity = (MultipleCurrencyInflationSensitivity) value;
return previousSensitivity.plus(currentSensitivity);
} else {
throw new IllegalArgumentException("Cannot sum results of type " + value.getClass());
}
}