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

  protected FdG2SwaptionEngine(long cPtr, boolean cMemoryOwn) {
    super(QuantLibJNI.FdG2SwaptionEngine_SWIGSmartPtrUpcast(cPtr), true);
    swigCMemOwnDerived = cMemoryOwn;
    swigCPtr = cPtr;
  }

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

  protected void swigSetCMemOwn(boolean own) {
    swigCMemOwnDerived = own;
    super.swigSetCMemOwn(own);
  }

  @SuppressWarnings("deprecation")
  protected void finalize() {
    delete();
  }

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

  public FdG2SwaptionEngine(G2 model, long tGrid, long xGrid, long yGrid, long dampingSteps, double invEps, FdmSchemeDesc schemeDesc) {
    this(QuantLibJNI.new_FdG2SwaptionEngine__SWIG_0(G2.getCPtr(model), model, tGrid, xGrid, yGrid, dampingSteps, invEps, FdmSchemeDesc.getCPtr(schemeDesc), schemeDesc), true);
  }

  public FdG2SwaptionEngine(G2 model, long tGrid, long xGrid, long yGrid, long dampingSteps, double invEps) {
    this(QuantLibJNI.new_FdG2SwaptionEngine__SWIG_1(G2.getCPtr(model), model, tGrid, xGrid, yGrid, dampingSteps, invEps), true);
  }

  public FdG2SwaptionEngine(G2 model, long tGrid, long xGrid, long yGrid, long dampingSteps) {
    this(QuantLibJNI.new_FdG2SwaptionEngine__SWIG_2(G2.getCPtr(model), model, tGrid, xGrid, yGrid, dampingSteps), true);
  }

  public FdG2SwaptionEngine(G2 model, long tGrid, long xGrid, long yGrid) {
    this(QuantLibJNI.new_FdG2SwaptionEngine__SWIG_3(G2.getCPtr(model), model, tGrid, xGrid, yGrid), true);
  }

  public FdG2SwaptionEngine(G2 model, long tGrid, long xGrid) {
    this(QuantLibJNI.new_FdG2SwaptionEngine__SWIG_4(G2.getCPtr(model), model, tGrid, xGrid), true);
  }

  public FdG2SwaptionEngine(G2 model, long tGrid) {
    this(QuantLibJNI.new_FdG2SwaptionEngine__SWIG_5(G2.getCPtr(model), model, tGrid), true);
  }

  public FdG2SwaptionEngine(G2 model) {
    this(QuantLibJNI.new_FdG2SwaptionEngine__SWIG_6(G2.getCPtr(model), model), true);
  }

}
