/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.29
 *
 * 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 FraRateHelper extends RateHelper {
  private long swigCPtr;

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

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

  protected void finalize() {
    delete();
  }

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

  public FraRateHelper(QuoteHandle rate, int monthsToStart, int monthsToEnd, int settlementDays, Calendar calendar, BusinessDayConvention convention, DayCounter dayCounter) {
    this(QuantLibJNI.new_FraRateHelper__SWIG_0(QuoteHandle.getCPtr(rate), monthsToStart, monthsToEnd, settlementDays, Calendar.getCPtr(calendar), convention.swigValue(), DayCounter.getCPtr(dayCounter)), true);
  }

  public FraRateHelper(double rate, int monthsToStart, int monthsToEnd, int settlementDays, Calendar calendar, BusinessDayConvention convention, DayCounter dayCounter) {
    this(QuantLibJNI.new_FraRateHelper__SWIG_1(rate, monthsToStart, monthsToEnd, settlementDays, Calendar.getCPtr(calendar), convention.swigValue(), DayCounter.getCPtr(dayCounter)), true);
  }

}
