/* ----------------------------------------------------------------------------
 * 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 FDBermudanEngine extends PricingEngine {
  private transient long swigCPtr;

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

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

  protected void finalize() {
    delete();
  }

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

  public FDBermudanEngine(GeneralizedBlackScholesProcess process, long timeSteps, long gridPoints, boolean timeDependent) {
    this(QuantLibJNI.new_FDBermudanEngine__SWIG_0(GeneralizedBlackScholesProcess.getCPtr(process), process, timeSteps, gridPoints, timeDependent), true);
  }

  public FDBermudanEngine(GeneralizedBlackScholesProcess process, long timeSteps, long gridPoints) {
    this(QuantLibJNI.new_FDBermudanEngine__SWIG_1(GeneralizedBlackScholesProcess.getCPtr(process), process, timeSteps, gridPoints), true);
  }

  public FDBermudanEngine(GeneralizedBlackScholesProcess process, long timeSteps) {
    this(QuantLibJNI.new_FDBermudanEngine__SWIG_2(GeneralizedBlackScholesProcess.getCPtr(process), process, timeSteps), true);
  }

  public FDBermudanEngine(GeneralizedBlackScholesProcess process) {
    this(QuantLibJNI.new_FDBermudanEngine__SWIG_3(GeneralizedBlackScholesProcess.getCPtr(process), process), true);
  }

}
