class CashFlowEquivalentCalculator {

  public static ImmutableMap<Payment, PointSensitivityBuilder> cashFlowEquivalentAndSensitivitySwap(
      ResolvedSwap swap,
      RatesProvider ratesProvider) {

    validateSwap(swap);
    ImmutableMap<Payment, PointSensitivityBuilder> mapFixed =
        cashFlowEquivalentAndSensitivityFixedLeg(swap.getLegs(SwapLegType.FIXED).get(0), ratesProvider);
    ImmutableMap<Payment, PointSensitivityBuilder> mapIbor =
        cashFlowEquivalentAndSensitivityIborLeg(swap.getLegs(SwapLegType.IBOR).get(0), ratesProvider);
    return ImmutableMap.<Payment, PointSensitivityBuilder>builder().putAll(mapFixed).putAll(mapIbor).build();
  }

  private  CashFlowEquivalentCalculator();

}