class SwapMultilegDefinition implements InstrumentDefinitionWithData<SwapMultileg, ZonedDateTimeDoubleTimeSeries[]> {

  @Override
  public SwapMultileg toDerivative(ZonedDateTime date) {
    ArgumentChecker.notNull(date, "date");
    final int nbLegs = _legs.length;
    @SuppressWarnings("unchecked")
    final Annuity<? extends Payment>[] legs = new Annuity[nbLegs];
    for (int loopleg = 0; loopleg < nbLegs; loopleg++) {
      legs[loopleg] = _legs[loopleg].toDerivative(date);
    }
    return new SwapMultileg(legs);
  }

  public  SwapMultilegDefinition(final AnnuityDefinition<? extends PaymentDefinition>[] legs);

}