class VariableNotionalProvider implements NotionalProvider {

  @Override
  public double getAmount(final LocalDate date) {
    if (_dates == null) {
      throw new IllegalArgumentException("date set is null");
    }

    for (int i = 0; i < _dates.length; ++i) {
      if (_dates[i].equals(date)) {
        return _notionals[i];
      }
    }
    throw new IllegalArgumentException("The date " + date + " is not found in the date set");
  }

  public  VariableNotionalProvider(LocalDate[] dates, double[] notionals);
  public  VariableNotionalProvider(double[] notionals);

}