/* ----------------------------------------------------------------------------
 * 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 InflationTermStructure extends TermStructure {
  private transient long swigCPtr;
  private transient boolean swigCMemOwnDerived;

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

  protected static long getCPtr(InflationTermStructure 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_InflationTermStructure(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

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

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

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

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

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

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

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

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

  public Seasonality seasonality() {
    long cPtr = QuantLibJNI.InflationTermStructure_seasonality(swigCPtr, this);
    return (cPtr == 0) ? null : new Seasonality(cPtr, true);
  }

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

}
