/* ----------------------------------------------------------------------------
 * 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 YoYOptionletVolatilitySurfaceHandle {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

  protected YoYOptionletVolatilitySurfaceHandle(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

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

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

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

  public YoYOptionletVolatilitySurfaceHandle(YoYOptionletVolatilitySurface arg0) {
    this(QuantLibJNI.new_YoYOptionletVolatilitySurfaceHandle__SWIG_0(YoYOptionletVolatilitySurface.getCPtr(arg0), arg0), true);
  }

  public YoYOptionletVolatilitySurfaceHandle() {
    this(QuantLibJNI.new_YoYOptionletVolatilitySurfaceHandle__SWIG_1(), true);
  }

  public YoYOptionletVolatilitySurface __deref__() {
    long cPtr = QuantLibJNI.YoYOptionletVolatilitySurfaceHandle___deref__(swigCPtr, this);
    return (cPtr == 0) ? null : new YoYOptionletVolatilitySurface(cPtr, true);
  }

  public YoYOptionletVolatilitySurface currentLink() {
    long cPtr = QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_currentLink(swigCPtr, this);
    return (cPtr == 0) ? null : new YoYOptionletVolatilitySurface(cPtr, true);
  }

  public boolean empty() {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_empty(swigCPtr, this);
  }

  public Observable asObservable() {
    long cPtr = QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_asObservable(swigCPtr, this);
    return (cPtr == 0) ? null : new Observable(cPtr, true);
  }

  public Period observationLag() {
    return new Period(QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_observationLag(swigCPtr, this), true);
  }

  public double frequency() {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_frequency(swigCPtr, this);
  }

  public boolean indexIsInterpolated() {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_indexIsInterpolated(swigCPtr, this);
  }

  public Date baseDate() {
    return new Date(QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_baseDate(swigCPtr, this), true);
  }

  public double timeFromBase(Date date, Period obsLag) {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_timeFromBase__SWIG_0(swigCPtr, this, Date.getCPtr(date), date, Period.getCPtr(obsLag), obsLag);
  }

  public double timeFromBase(Date date) {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_timeFromBase__SWIG_1(swigCPtr, this, Date.getCPtr(date), date);
  }

  public double minStrike() {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_minStrike(swigCPtr, this);
  }

  public double maxStrike() {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_maxStrike(swigCPtr, this);
  }

  public double baseLevel() {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_baseLevel(swigCPtr, this);
  }

  public double volatility(Date maturityDate, double strike, Period obsLag, boolean extrapolate) {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_volatility__SWIG_0(swigCPtr, this, Date.getCPtr(maturityDate), maturityDate, strike, Period.getCPtr(obsLag), obsLag, extrapolate);
  }

  public double volatility(Date maturityDate, double strike, Period obsLag) {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_volatility__SWIG_1(swigCPtr, this, Date.getCPtr(maturityDate), maturityDate, strike, Period.getCPtr(obsLag), obsLag);
  }

  public double volatility(Date maturityDate, double strike) {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_volatility__SWIG_2(swigCPtr, this, Date.getCPtr(maturityDate), maturityDate, strike);
  }

  public double volatility(Period optionTenor, double strike, Period obsLag, boolean extrapolate) {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_volatility__SWIG_3(swigCPtr, this, Period.getCPtr(optionTenor), optionTenor, strike, Period.getCPtr(obsLag), obsLag, extrapolate);
  }

  public double volatility(Period optionTenor, double strike, Period obsLag) {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_volatility__SWIG_4(swigCPtr, this, Period.getCPtr(optionTenor), optionTenor, strike, Period.getCPtr(obsLag), obsLag);
  }

  public double volatility(Period optionTenor, double strike) {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_volatility__SWIG_5(swigCPtr, this, Period.getCPtr(optionTenor), optionTenor, strike);
  }

  public double totalVariance(Date exerciseDate, double strike, Period obsLag, boolean extrapolate) {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_totalVariance__SWIG_0(swigCPtr, this, Date.getCPtr(exerciseDate), exerciseDate, strike, Period.getCPtr(obsLag), obsLag, extrapolate);
  }

  public double totalVariance(Date exerciseDate, double strike, Period obsLag) {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_totalVariance__SWIG_1(swigCPtr, this, Date.getCPtr(exerciseDate), exerciseDate, strike, Period.getCPtr(obsLag), obsLag);
  }

  public double totalVariance(Date exerciseDate, double strike) {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_totalVariance__SWIG_2(swigCPtr, this, Date.getCPtr(exerciseDate), exerciseDate, strike);
  }

  public double totalVariance(Period optionTenor, double strike, Period obsLag, boolean extrapolate) {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_totalVariance__SWIG_3(swigCPtr, this, Period.getCPtr(optionTenor), optionTenor, strike, Period.getCPtr(obsLag), obsLag, extrapolate);
  }

  public double totalVariance(Period optionTenor, double strike, Period obsLag) {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_totalVariance__SWIG_4(swigCPtr, this, Period.getCPtr(optionTenor), optionTenor, strike, Period.getCPtr(obsLag), obsLag);
  }

  public double totalVariance(Period optionTenor, double strike) {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_totalVariance__SWIG_5(swigCPtr, this, Period.getCPtr(optionTenor), optionTenor, strike);
  }

  public DayCounter dayCounter() {
    return new DayCounter(QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_dayCounter(swigCPtr, this), true);
  }

  public double timeFromReference(Date date) {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_timeFromReference(swigCPtr, this, Date.getCPtr(date), date);
  }

  public Calendar calendar() {
    return new Calendar(QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_calendar(swigCPtr, this), true);
  }

  public Date referenceDate() {
    return new Date(QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_referenceDate(swigCPtr, this), true);
  }

  public Date maxDate() {
    return new Date(QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_maxDate(swigCPtr, this), true);
  }

  public double maxTime() {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_maxTime(swigCPtr, this);
  }

  public void enableExtrapolation() {
    QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_enableExtrapolation(swigCPtr, this);
  }

  public void disableExtrapolation() {
    QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_disableExtrapolation(swigCPtr, this);
  }

  public boolean allowsExtrapolation() {
    return QuantLibJNI.YoYOptionletVolatilitySurfaceHandle_allowsExtrapolation(swigCPtr, this);
  }

}
