class GeneratorDeposit extends GeneratorInstrument<GeneratorAttributeIR> {

  @Override
  public CashDefinition generateInstrument(final ZonedDateTime date, final double rate, final double notional, final GeneratorAttributeIR attribute) {
    ArgumentChecker.notNull(date, "Reference date");
    ArgumentChecker.notNull(attribute, "Attributes");
    final ZonedDateTime spot = ScheduleCalculator.getAdjustedDate(date, _spotLag, _calendar);
    final ZonedDateTime startDate = ScheduleCalculator.getAdjustedDate(spot, attribute.getStartPeriod(), this);
    final ZonedDateTime endDate = ScheduleCalculator.getAdjustedDate(startDate, attribute.getEndPeriod(), this);
    final double accrualFactor = _dayCount.getDayCountFraction(startDate, endDate, _calendar);
    return new CashDefinition(_currency, startDate, endDate, notional, rate, accrualFactor);
  }

  public  GeneratorDeposit(final String name, final Currency currency, final Calendar calendar, final int spotLag, final DayCount dayCount,
      final BusinessDayConvention businessDayConvention, final boolean endOfMonth);

}