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

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

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

  protected void finalize() {
    delete();
  }

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

  public LognormalCmsSpreadPricer(CmsCouponPricer cmsPricer, QuoteHandle correlation, YieldTermStructureHandle couponDiscountCurve, long IntegrationPoints, SWIGTYPE_p_boost__optionalT_VolatilityType_t volatilityType, double shift1, double shift2) {
    this(QuantLibJNI.new_LognormalCmsSpreadPricer__SWIG_0(CmsCouponPricer.getCPtr(cmsPricer), cmsPricer, QuoteHandle.getCPtr(correlation), correlation, YieldTermStructureHandle.getCPtr(couponDiscountCurve), couponDiscountCurve, IntegrationPoints, SWIGTYPE_p_boost__optionalT_VolatilityType_t.getCPtr(volatilityType), shift1, shift2), true);
  }

  public LognormalCmsSpreadPricer(CmsCouponPricer cmsPricer, QuoteHandle correlation, YieldTermStructureHandle couponDiscountCurve, long IntegrationPoints, SWIGTYPE_p_boost__optionalT_VolatilityType_t volatilityType, double shift1) {
    this(QuantLibJNI.new_LognormalCmsSpreadPricer__SWIG_1(CmsCouponPricer.getCPtr(cmsPricer), cmsPricer, QuoteHandle.getCPtr(correlation), correlation, YieldTermStructureHandle.getCPtr(couponDiscountCurve), couponDiscountCurve, IntegrationPoints, SWIGTYPE_p_boost__optionalT_VolatilityType_t.getCPtr(volatilityType), shift1), true);
  }

  public LognormalCmsSpreadPricer(CmsCouponPricer cmsPricer, QuoteHandle correlation, YieldTermStructureHandle couponDiscountCurve, long IntegrationPoints, SWIGTYPE_p_boost__optionalT_VolatilityType_t volatilityType) {
    this(QuantLibJNI.new_LognormalCmsSpreadPricer__SWIG_2(CmsCouponPricer.getCPtr(cmsPricer), cmsPricer, QuoteHandle.getCPtr(correlation), correlation, YieldTermStructureHandle.getCPtr(couponDiscountCurve), couponDiscountCurve, IntegrationPoints, SWIGTYPE_p_boost__optionalT_VolatilityType_t.getCPtr(volatilityType)), true);
  }

  public LognormalCmsSpreadPricer(CmsCouponPricer cmsPricer, QuoteHandle correlation, YieldTermStructureHandle couponDiscountCurve, long IntegrationPoints) {
    this(QuantLibJNI.new_LognormalCmsSpreadPricer__SWIG_3(CmsCouponPricer.getCPtr(cmsPricer), cmsPricer, QuoteHandle.getCPtr(correlation), correlation, YieldTermStructureHandle.getCPtr(couponDiscountCurve), couponDiscountCurve, IntegrationPoints), true);
  }

  public LognormalCmsSpreadPricer(CmsCouponPricer cmsPricer, QuoteHandle correlation, YieldTermStructureHandle couponDiscountCurve) {
    this(QuantLibJNI.new_LognormalCmsSpreadPricer__SWIG_4(CmsCouponPricer.getCPtr(cmsPricer), cmsPricer, QuoteHandle.getCPtr(correlation), correlation, YieldTermStructureHandle.getCPtr(couponDiscountCurve), couponDiscountCurve), true);
  }

  public LognormalCmsSpreadPricer(CmsCouponPricer cmsPricer, QuoteHandle correlation) {
    this(QuantLibJNI.new_LognormalCmsSpreadPricer__SWIG_5(CmsCouponPricer.getCPtr(cmsPricer), cmsPricer, QuoteHandle.getCPtr(correlation), correlation), true);
  }

  public double swapletPrice() {
    return QuantLibJNI.LognormalCmsSpreadPricer_swapletPrice(swigCPtr, this);
  }

  public double swapletRate() {
    return QuantLibJNI.LognormalCmsSpreadPricer_swapletRate(swigCPtr, this);
  }

  public double capletPrice(double effectiveCap) {
    return QuantLibJNI.LognormalCmsSpreadPricer_capletPrice(swigCPtr, this, effectiveCap);
  }

  public double capletRate(double effectiveCap) {
    return QuantLibJNI.LognormalCmsSpreadPricer_capletRate(swigCPtr, this, effectiveCap);
  }

  public double floorletPrice(double effectiveFloor) {
    return QuantLibJNI.LognormalCmsSpreadPricer_floorletPrice(swigCPtr, this, effectiveFloor);
  }

  public double floorletRate(double effectiveFloor) {
    return QuantLibJNI.LognormalCmsSpreadPricer_floorletRate(swigCPtr, this, effectiveFloor);
  }

}
