/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.10
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package org.quantlib;

public class YearOnYearInflationSwapHelper extends YoYHelper {
  private transient long swigCPtr;

  protected YearOnYearInflationSwapHelper(long cPtr, boolean cMemoryOwn) {
    super(QuantLibJNI.YearOnYearInflationSwapHelper_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  protected static long getCPtr(YearOnYearInflationSwapHelper obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        QuantLibJNI.delete_YearOnYearInflationSwapHelper(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public YearOnYearInflationSwapHelper(double rate, Period lag, Date maturity, Calendar calendar, BusinessDayConvention bdc, DayCounter dayCounter, YoYInflationIndex index) {
    this(QuantLibJNI.new_YearOnYearInflationSwapHelper(rate, Period.getCPtr(lag), lag, Date.getCPtr(maturity), maturity, Calendar.getCPtr(calendar), calendar, bdc.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, YoYInflationIndex.getCPtr(index), index), true);
  }

}
