*/
public Map<String, List<DoublesPair>> calculatePriceSensitivityToCurve(final Annuity<? extends Payment> annuity, final T curves, final double zSpread) {
ArgumentChecker.notNull(annuity, "annuity");
ArgumentChecker.notNull(curves, "curves");
final MultipleCurrencyMulticurveSensitivity pvss = annuity.accept(_pvSensitivityCalculator, curves);
final Set<Currency> currencies = pvss.getCurrencies();
if (currencies.size() != 1) {
throw new IllegalStateException("Had more than one currency in result: " + pvss.getCurrencies());
}
final MulticurveSensitivity sensitivities = pvss.getSensitivity(Iterables.getOnlyElement(currencies));
if (Double.doubleToLongBits(zSpread) == 0) {
return sensitivities.getYieldDiscountingSensitivities();
}
final Map<String, List<DoublesPair>> result = new HashMap<>();
for (final Map.Entry<String, List<DoublesPair>> entry : sensitivities.getYieldDiscountingSensitivities().entrySet()) {