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

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

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

  protected void finalize() {
    delete();
  }

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

  public BlackVarianceSurface(Date referenceDate, Calendar cal, DateVector dates, DoubleVector strikes, Matrix blackVols, DayCounter dayCounter, _BlackVarianceSurface.Extrapolation lower, _BlackVarianceSurface.Extrapolation upper, String interpolator) {
    this(QuantLibJNI.new_BlackVarianceSurface__SWIG_0(Date.getCPtr(referenceDate), referenceDate, Calendar.getCPtr(cal), cal, DateVector.getCPtr(dates), dates, DoubleVector.getCPtr(strikes), strikes, Matrix.getCPtr(blackVols), blackVols, DayCounter.getCPtr(dayCounter), dayCounter, lower.swigValue(), upper.swigValue(), interpolator), true);
  }

  public BlackVarianceSurface(Date referenceDate, Calendar cal, DateVector dates, DoubleVector strikes, Matrix blackVols, DayCounter dayCounter, _BlackVarianceSurface.Extrapolation lower, _BlackVarianceSurface.Extrapolation upper) {
    this(QuantLibJNI.new_BlackVarianceSurface__SWIG_1(Date.getCPtr(referenceDate), referenceDate, Calendar.getCPtr(cal), cal, DateVector.getCPtr(dates), dates, DoubleVector.getCPtr(strikes), strikes, Matrix.getCPtr(blackVols), blackVols, DayCounter.getCPtr(dayCounter), dayCounter, lower.swigValue(), upper.swigValue()), true);
  }

  public BlackVarianceSurface(Date referenceDate, Calendar cal, DateVector dates, DoubleVector strikes, Matrix blackVols, DayCounter dayCounter, _BlackVarianceSurface.Extrapolation lower) {
    this(QuantLibJNI.new_BlackVarianceSurface__SWIG_2(Date.getCPtr(referenceDate), referenceDate, Calendar.getCPtr(cal), cal, DateVector.getCPtr(dates), dates, DoubleVector.getCPtr(strikes), strikes, Matrix.getCPtr(blackVols), blackVols, DayCounter.getCPtr(dayCounter), dayCounter, lower.swigValue()), true);
  }

  public BlackVarianceSurface(Date referenceDate, Calendar cal, DateVector dates, DoubleVector strikes, Matrix blackVols, DayCounter dayCounter) {
    this(QuantLibJNI.new_BlackVarianceSurface__SWIG_3(Date.getCPtr(referenceDate), referenceDate, Calendar.getCPtr(cal), cal, DateVector.getCPtr(dates), dates, DoubleVector.getCPtr(strikes), strikes, Matrix.getCPtr(blackVols), blackVols, DayCounter.getCPtr(dayCounter), dayCounter), true);
  }

  public void setInterpolation(String interpolator) {
    QuantLibJNI.BlackVarianceSurface_setInterpolation__SWIG_0(swigCPtr, this, interpolator);
  }

  public void setInterpolation() {
    QuantLibJNI.BlackVarianceSurface_setInterpolation__SWIG_1(swigCPtr, this);
  }

  public final static _BlackVarianceSurface.Extrapolation ConstantExtrapolation = _BlackVarianceSurface.Extrapolation.swigToEnum(QuantLibJNI.BlackVarianceSurface_ConstantExtrapolation_get());
  public final static _BlackVarianceSurface.Extrapolation InterpolatorDefaultExtrapolation = _BlackVarianceSurface.Extrapolation.swigToEnum(QuantLibJNI.BlackVarianceSurface_InterpolatorDefaultExtrapolation_get());
}
