001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (https://www.swig.org).
003 * Version 4.1.1
004 *
005 * Do not make changes to this file unless you know what you are doing - modify
006 * the SWIG interface file instead.
007 * ----------------------------------------------------------------------------- */
008
009package org.quantlib;
010
011public class CPICoupon extends InflationCoupon implements org.quantlib.helpers.QuantLibJNIHelpers.AutoCloseable {
012  private transient long swigCPtr;
013  private transient boolean swigCMemOwnDerived;
014
015  protected CPICoupon(long cPtr, boolean cMemoryOwn) {
016    super(QuantLibJNI.CPICoupon_SWIGSmartPtrUpcast(cPtr), true);
017    swigCMemOwnDerived = cMemoryOwn;
018    swigCPtr = cPtr;
019  }
020
021  protected static long getCPtr(CPICoupon obj) {
022    return (obj == null) ? 0 : obj.swigCPtr;
023  }
024
025  protected void swigSetCMemOwn(boolean own) {
026    swigCMemOwnDerived = own;
027    super.swigSetCMemOwn(own);
028  }
029
030  @SuppressWarnings("deprecation")
031  protected void finalize() {
032    delete();
033  }
034
035  public synchronized void delete() {
036    if (swigCPtr != 0) {
037      if (swigCMemOwnDerived) {
038        swigCMemOwnDerived = false;
039        QuantLibJNI.delete_CPICoupon(swigCPtr);
040      }
041      swigCPtr = 0;
042    }
043    super.delete();
044  }
045
046  public CPICoupon(double baseCPI, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate, Date refPeriodStart, Date refPeriodEnd, Date exCouponDate) {
047    this(QuantLibJNI.new_CPICoupon__SWIG_0(baseCPI, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate, Date.getCPtr(refPeriodStart), refPeriodStart, Date.getCPtr(refPeriodEnd), refPeriodEnd, Date.getCPtr(exCouponDate), exCouponDate), true);
048  }
049
050  public CPICoupon(double baseCPI, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate, Date refPeriodStart, Date refPeriodEnd) {
051    this(QuantLibJNI.new_CPICoupon__SWIG_1(baseCPI, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate, Date.getCPtr(refPeriodStart), refPeriodStart, Date.getCPtr(refPeriodEnd), refPeriodEnd), true);
052  }
053
054  public CPICoupon(double baseCPI, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate, Date refPeriodStart) {
055    this(QuantLibJNI.new_CPICoupon__SWIG_2(baseCPI, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate, Date.getCPtr(refPeriodStart), refPeriodStart), true);
056  }
057
058  public CPICoupon(double baseCPI, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate) {
059    this(QuantLibJNI.new_CPICoupon__SWIG_3(baseCPI, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate), true);
060  }
061
062  public CPICoupon(Date baseDate, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate, Date refPeriodStart, Date refPeriodEnd, Date exCouponDate) {
063    this(QuantLibJNI.new_CPICoupon__SWIG_4(Date.getCPtr(baseDate), baseDate, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate, Date.getCPtr(refPeriodStart), refPeriodStart, Date.getCPtr(refPeriodEnd), refPeriodEnd, Date.getCPtr(exCouponDate), exCouponDate), true);
064  }
065
066  public CPICoupon(Date baseDate, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate, Date refPeriodStart, Date refPeriodEnd) {
067    this(QuantLibJNI.new_CPICoupon__SWIG_5(Date.getCPtr(baseDate), baseDate, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate, Date.getCPtr(refPeriodStart), refPeriodStart, Date.getCPtr(refPeriodEnd), refPeriodEnd), true);
068  }
069
070  public CPICoupon(Date baseDate, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate, Date refPeriodStart) {
071    this(QuantLibJNI.new_CPICoupon__SWIG_6(Date.getCPtr(baseDate), baseDate, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate, Date.getCPtr(refPeriodStart), refPeriodStart), true);
072  }
073
074  public CPICoupon(Date baseDate, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate) {
075    this(QuantLibJNI.new_CPICoupon__SWIG_7(Date.getCPtr(baseDate), baseDate, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate), true);
076  }
077
078  public CPICoupon(double baseCPI, Date baseDate, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate, Date refPeriodStart, Date refPeriodEnd, Date exCouponDate) {
079    this(QuantLibJNI.new_CPICoupon__SWIG_8(baseCPI, Date.getCPtr(baseDate), baseDate, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate, Date.getCPtr(refPeriodStart), refPeriodStart, Date.getCPtr(refPeriodEnd), refPeriodEnd, Date.getCPtr(exCouponDate), exCouponDate), true);
080  }
081
082  public CPICoupon(double baseCPI, Date baseDate, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate, Date refPeriodStart, Date refPeriodEnd) {
083    this(QuantLibJNI.new_CPICoupon__SWIG_9(baseCPI, Date.getCPtr(baseDate), baseDate, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate, Date.getCPtr(refPeriodStart), refPeriodStart, Date.getCPtr(refPeriodEnd), refPeriodEnd), true);
084  }
085
086  public CPICoupon(double baseCPI, Date baseDate, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate, Date refPeriodStart) {
087    this(QuantLibJNI.new_CPICoupon__SWIG_10(baseCPI, Date.getCPtr(baseDate), baseDate, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate, Date.getCPtr(refPeriodStart), refPeriodStart), true);
088  }
089
090  public CPICoupon(double baseCPI, Date baseDate, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate) {
091    this(QuantLibJNI.new_CPICoupon__SWIG_11(baseCPI, Date.getCPtr(baseDate), baseDate, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate), true);
092  }
093
094  public CPICoupon(double baseCPI, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate, double spread, Date refPeriodStart, Date refPeriodEnd, Date exCouponDate) {
095    this(QuantLibJNI.new_CPICoupon__SWIG_12(baseCPI, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate, spread, Date.getCPtr(refPeriodStart), refPeriodStart, Date.getCPtr(refPeriodEnd), refPeriodEnd, Date.getCPtr(exCouponDate), exCouponDate), true);
096  }
097
098  public CPICoupon(double baseCPI, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate, double spread, Date refPeriodStart, Date refPeriodEnd) {
099    this(QuantLibJNI.new_CPICoupon__SWIG_13(baseCPI, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate, spread, Date.getCPtr(refPeriodStart), refPeriodStart, Date.getCPtr(refPeriodEnd), refPeriodEnd), true);
100  }
101
102  public CPICoupon(double baseCPI, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate, double spread, Date refPeriodStart) {
103    this(QuantLibJNI.new_CPICoupon__SWIG_14(baseCPI, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate, spread, Date.getCPtr(refPeriodStart), refPeriodStart), true);
104  }
105
106  public CPICoupon(double baseCPI, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate, double spread) {
107    this(QuantLibJNI.new_CPICoupon__SWIG_15(baseCPI, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate, spread), true);
108  }
109
110  public CPICoupon(Date baseDate, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate, double spread, Date refPeriodStart, Date refPeriodEnd, Date exCouponDate) {
111    this(QuantLibJNI.new_CPICoupon__SWIG_16(Date.getCPtr(baseDate), baseDate, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate, spread, Date.getCPtr(refPeriodStart), refPeriodStart, Date.getCPtr(refPeriodEnd), refPeriodEnd, Date.getCPtr(exCouponDate), exCouponDate), true);
112  }
113
114  public CPICoupon(Date baseDate, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate, double spread, Date refPeriodStart, Date refPeriodEnd) {
115    this(QuantLibJNI.new_CPICoupon__SWIG_17(Date.getCPtr(baseDate), baseDate, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate, spread, Date.getCPtr(refPeriodStart), refPeriodStart, Date.getCPtr(refPeriodEnd), refPeriodEnd), true);
116  }
117
118  public CPICoupon(Date baseDate, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate, double spread, Date refPeriodStart) {
119    this(QuantLibJNI.new_CPICoupon__SWIG_18(Date.getCPtr(baseDate), baseDate, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate, spread, Date.getCPtr(refPeriodStart), refPeriodStart), true);
120  }
121
122  public CPICoupon(Date baseDate, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate, double spread) {
123    this(QuantLibJNI.new_CPICoupon__SWIG_19(Date.getCPtr(baseDate), baseDate, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate, spread), true);
124  }
125
126  public CPICoupon(double baseCPI, Date baseDate, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate, double spread, Date refPeriodStart, Date refPeriodEnd, Date exCouponDate) {
127    this(QuantLibJNI.new_CPICoupon__SWIG_20(baseCPI, Date.getCPtr(baseDate), baseDate, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate, spread, Date.getCPtr(refPeriodStart), refPeriodStart, Date.getCPtr(refPeriodEnd), refPeriodEnd, Date.getCPtr(exCouponDate), exCouponDate), true);
128  }
129
130  public CPICoupon(double baseCPI, Date baseDate, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate, double spread, Date refPeriodStart, Date refPeriodEnd) {
131    this(QuantLibJNI.new_CPICoupon__SWIG_21(baseCPI, Date.getCPtr(baseDate), baseDate, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate, spread, Date.getCPtr(refPeriodStart), refPeriodStart, Date.getCPtr(refPeriodEnd), refPeriodEnd), true);
132  }
133
134  public CPICoupon(double baseCPI, Date baseDate, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate, double spread, Date refPeriodStart) {
135    this(QuantLibJNI.new_CPICoupon__SWIG_22(baseCPI, Date.getCPtr(baseDate), baseDate, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate, spread, Date.getCPtr(refPeriodStart), refPeriodStart), true);
136  }
137
138  public CPICoupon(double baseCPI, Date baseDate, Date paymentDate, double nominal, Date startDate, Date endDate, ZeroInflationIndex index, Period observationLag, CPI.InterpolationType observationInterpolation, DayCounter dayCounter, double fixedRate, double spread) {
139    this(QuantLibJNI.new_CPICoupon__SWIG_23(baseCPI, Date.getCPtr(baseDate), baseDate, Date.getCPtr(paymentDate), paymentDate, nominal, Date.getCPtr(startDate), startDate, Date.getCPtr(endDate), endDate, ZeroInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, observationInterpolation.swigValue(), DayCounter.getCPtr(dayCounter), dayCounter, fixedRate, spread), true);
140  }
141
142  public double fixedRate() {
143    return QuantLibJNI.CPICoupon_fixedRate(swigCPtr, this);
144  }
145
146  public double spread() {
147    return QuantLibJNI.CPICoupon_spread(swigCPtr, this);
148  }
149
150  public double adjustedIndexGrowth() {
151    return QuantLibJNI.CPICoupon_adjustedIndexGrowth(swigCPtr, this);
152  }
153
154  public double indexFixing() {
155    return QuantLibJNI.CPICoupon_indexFixing(swigCPtr, this);
156  }
157
158  public double indexRatio(Date d) {
159    return QuantLibJNI.CPICoupon_indexRatio(swigCPtr, this, Date.getCPtr(d), d);
160  }
161
162  public double baseCPI() {
163    return QuantLibJNI.CPICoupon_baseCPI(swigCPtr, this);
164  }
165
166  public Date baseDate() {
167    return new Date(QuantLibJNI.CPICoupon_baseDate(swigCPtr, this), true);
168  }
169
170  public CPI.InterpolationType observationInterpolation() {
171    return CPI.InterpolationType.swigToEnum(QuantLibJNI.CPICoupon_observationInterpolation(swigCPtr, this));
172  }
173
174  public ZeroInflationIndex cpiIndex() {
175    long cPtr = QuantLibJNI.CPICoupon_cpiIndex(swigCPtr, this);
176    return (cPtr == 0) ? null : new ZeroInflationIndex(cPtr, true);
177  }
178
179  public void setPricer(CPICouponPricer arg0) {
180    QuantLibJNI.CPICoupon_setPricer(swigCPtr, this, CPICouponPricer.getCPtr(arg0), arg0);
181  }
182
183}