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

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

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

  protected void finalize() {
    delete();
  }

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

  public YoYInflationTermStructureHandle(YoYInflationTermStructure arg0) {
    this(QuantLibJNI.new_YoYInflationTermStructureHandle__SWIG_0(YoYInflationTermStructure.getCPtr(arg0), arg0), true);
  }

  public YoYInflationTermStructureHandle() {
    this(QuantLibJNI.new_YoYInflationTermStructureHandle__SWIG_1(), true);
  }

  public YoYInflationTermStructure __deref__() {
    return new YoYInflationTermStructure(QuantLibJNI.YoYInflationTermStructureHandle___deref__(swigCPtr, this), true);
  }

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

  public Observable asObservable() {
    return new Observable(QuantLibJNI.YoYInflationTermStructureHandle_asObservable(swigCPtr, this), true);
  }

  public double yoyRate(Date d, Period instObsLag, boolean forceLinearInterpolation, boolean extrapolate) {
    return QuantLibJNI.YoYInflationTermStructureHandle_yoyRate__SWIG_0(swigCPtr, this, Date.getCPtr(d), d, Period.getCPtr(instObsLag), instObsLag, forceLinearInterpolation, extrapolate);
  }

  public double yoyRate(Date d, Period instObsLag, boolean forceLinearInterpolation) {
    return QuantLibJNI.YoYInflationTermStructureHandle_yoyRate__SWIG_1(swigCPtr, this, Date.getCPtr(d), d, Period.getCPtr(instObsLag), instObsLag, forceLinearInterpolation);
  }

  public double yoyRate(Date d, Period instObsLag) {
    return QuantLibJNI.YoYInflationTermStructureHandle_yoyRate__SWIG_2(swigCPtr, this, Date.getCPtr(d), d, Period.getCPtr(instObsLag), instObsLag);
  }

  public double yoyRate(Date d) {
    return QuantLibJNI.YoYInflationTermStructureHandle_yoyRate__SWIG_3(swigCPtr, this, Date.getCPtr(d), d);
  }

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

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

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

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

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

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

  public Frequency frequency() {
    return Frequency.swigToEnum(QuantLibJNI.YoYInflationTermStructureHandle_frequency(swigCPtr, this));
  }

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

  public double baseRate() {
    return QuantLibJNI.YoYInflationTermStructureHandle_baseRate(swigCPtr, this);
  }

  public YieldTermStructureHandle nominalTermStructure() {
    return new YieldTermStructureHandle(QuantLibJNI.YoYInflationTermStructureHandle_nominalTermStructure(swigCPtr, this), true);
  }

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

  public void setSeasonality(Seasonality seasonality) {
    QuantLibJNI.YoYInflationTermStructureHandle_setSeasonality__SWIG_0(swigCPtr, this, Seasonality.getCPtr(seasonality), seasonality);
  }

  public void setSeasonality() {
    QuantLibJNI.YoYInflationTermStructureHandle_setSeasonality__SWIG_1(swigCPtr, this);
  }

  public Seasonality seasonality() {
    return new Seasonality(QuantLibJNI.YoYInflationTermStructureHandle_seasonality(swigCPtr, this), true);
  }

  public boolean hasSeasonality() {
    return QuantLibJNI.YoYInflationTermStructureHandle_hasSeasonality(swigCPtr, this);
  }

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

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

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

}
