class AnnuityPaymentFixedDefinition extends AnnuityDefinition<PaymentFixedDefinition> {

  @Override
  public AnnuityPaymentFixed toDerivative(final ZonedDateTime date) {
    final List<PaymentFixed> resultList = new ArrayList<>();
    for (int loopcoupon = 0; loopcoupon < getPayments().length; loopcoupon++) {
      if (!date.isAfter(getNthPayment(loopcoupon).getPaymentDate())) {
        resultList.add(getNthPayment(loopcoupon).toDerivative(date));
      }
    }
    return new AnnuityPaymentFixed(resultList.toArray(new PaymentFixed[resultList.size()]));
  }

  public  AnnuityPaymentFixedDefinition(final PaymentFixedDefinition[] payments, final Calendar calendar);

}