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 YoYCapFloorTermPriceSurface extends InflationTermStructure implements org.quantlib.helpers.QuantLibJNIHelpers.AutoCloseable { 012 private transient long swigCPtr; 013 private transient boolean swigCMemOwnDerived; 014 015 protected YoYCapFloorTermPriceSurface(long cPtr, boolean cMemoryOwn) { 016 super(QuantLibJNI.YoYCapFloorTermPriceSurface_SWIGSmartPtrUpcast(cPtr), true); 017 swigCMemOwnDerived = cMemoryOwn; 018 swigCPtr = cPtr; 019 } 020 021 protected static long getCPtr(YoYCapFloorTermPriceSurface 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_YoYCapFloorTermPriceSurface(swigCPtr); 040 } 041 swigCPtr = 0; 042 } 043 super.delete(); 044 } 045 046 public PairDoubleVector atmYoYSwapTimeRates() { 047 return new PairDoubleVector(QuantLibJNI.YoYCapFloorTermPriceSurface_atmYoYSwapTimeRates(swigCPtr, this), true); 048 } 049 050 public SWIGTYPE_p_std__pairT_std__vectorT_Date_t_std__vectorT_double_t_t atmYoYSwapDateRates() { 051 return new SWIGTYPE_p_std__pairT_std__vectorT_Date_t_std__vectorT_double_t_t(QuantLibJNI.YoYCapFloorTermPriceSurface_atmYoYSwapDateRates(swigCPtr, this), true); 052 } 053 054 public YoYInflationTermStructure YoYTS() { 055 long cPtr = QuantLibJNI.YoYCapFloorTermPriceSurface_YoYTS(swigCPtr, this); 056 return (cPtr == 0) ? null : new YoYInflationTermStructure(cPtr, true); 057 } 058 059 public YoYInflationIndex yoyIndex() { 060 long cPtr = QuantLibJNI.YoYCapFloorTermPriceSurface_yoyIndex(swigCPtr, this); 061 return (cPtr == 0) ? null : new YoYInflationIndex(cPtr, true); 062 } 063 064 public BusinessDayConvention businessDayConvention() { 065 return BusinessDayConvention.swigToEnum(QuantLibJNI.YoYCapFloorTermPriceSurface_businessDayConvention(swigCPtr, this)); 066 } 067 068 public long fixingDays() { 069 return QuantLibJNI.YoYCapFloorTermPriceSurface_fixingDays(swigCPtr, this); 070 } 071 072 public double price(Date d, double k) { 073 return QuantLibJNI.YoYCapFloorTermPriceSurface_price__SWIG_0(swigCPtr, this, Date.getCPtr(d), d, k); 074 } 075 076 public double capPrice(Date d, double k) { 077 return QuantLibJNI.YoYCapFloorTermPriceSurface_capPrice__SWIG_0(swigCPtr, this, Date.getCPtr(d), d, k); 078 } 079 080 public double floorPrice(Date d, double k) { 081 return QuantLibJNI.YoYCapFloorTermPriceSurface_floorPrice__SWIG_0(swigCPtr, this, Date.getCPtr(d), d, k); 082 } 083 084 public double atmYoYSwapRate(Date d, boolean extrapolate) { 085 return QuantLibJNI.YoYCapFloorTermPriceSurface_atmYoYSwapRate__SWIG_0(swigCPtr, this, Date.getCPtr(d), d, extrapolate); 086 } 087 088 public double atmYoYSwapRate(Date d) { 089 return QuantLibJNI.YoYCapFloorTermPriceSurface_atmYoYSwapRate__SWIG_1(swigCPtr, this, Date.getCPtr(d), d); 090 } 091 092 public double atmYoYRate(Date d, Period obsLag, boolean extrapolate) { 093 return QuantLibJNI.YoYCapFloorTermPriceSurface_atmYoYRate__SWIG_0(swigCPtr, this, Date.getCPtr(d), d, Period.getCPtr(obsLag), obsLag, extrapolate); 094 } 095 096 public double atmYoYRate(Date d, Period obsLag) { 097 return QuantLibJNI.YoYCapFloorTermPriceSurface_atmYoYRate__SWIG_1(swigCPtr, this, Date.getCPtr(d), d, Period.getCPtr(obsLag), obsLag); 098 } 099 100 public double atmYoYRate(Date d) { 101 return QuantLibJNI.YoYCapFloorTermPriceSurface_atmYoYRate__SWIG_2(swigCPtr, this, Date.getCPtr(d), d); 102 } 103 104 public double price(Period d, double k) { 105 return QuantLibJNI.YoYCapFloorTermPriceSurface_price__SWIG_1(swigCPtr, this, Period.getCPtr(d), d, k); 106 } 107 108 public double capPrice(Period d, double k) { 109 return QuantLibJNI.YoYCapFloorTermPriceSurface_capPrice__SWIG_1(swigCPtr, this, Period.getCPtr(d), d, k); 110 } 111 112 public double floorPrice(Period d, double k) { 113 return QuantLibJNI.YoYCapFloorTermPriceSurface_floorPrice__SWIG_1(swigCPtr, this, Period.getCPtr(d), d, k); 114 } 115 116 public double atmYoYSwapRate(Period d, boolean extrapolate) { 117 return QuantLibJNI.YoYCapFloorTermPriceSurface_atmYoYSwapRate__SWIG_2(swigCPtr, this, Period.getCPtr(d), d, extrapolate); 118 } 119 120 public double atmYoYSwapRate(Period d) { 121 return QuantLibJNI.YoYCapFloorTermPriceSurface_atmYoYSwapRate__SWIG_3(swigCPtr, this, Period.getCPtr(d), d); 122 } 123 124 public double atmYoYRate(Period d, Period obsLag, boolean extrapolate) { 125 return QuantLibJNI.YoYCapFloorTermPriceSurface_atmYoYRate__SWIG_3(swigCPtr, this, Period.getCPtr(d), d, Period.getCPtr(obsLag), obsLag, extrapolate); 126 } 127 128 public double atmYoYRate(Period d, Period obsLag) { 129 return QuantLibJNI.YoYCapFloorTermPriceSurface_atmYoYRate__SWIG_4(swigCPtr, this, Period.getCPtr(d), d, Period.getCPtr(obsLag), obsLag); 130 } 131 132 public double atmYoYRate(Period d) { 133 return QuantLibJNI.YoYCapFloorTermPriceSurface_atmYoYRate__SWIG_5(swigCPtr, this, Period.getCPtr(d), d); 134 } 135 136 public DoubleVector strikes() { 137 return new DoubleVector(QuantLibJNI.YoYCapFloorTermPriceSurface_strikes(swigCPtr, this), true); 138 } 139 140 public DoubleVector capStrikes() { 141 return new DoubleVector(QuantLibJNI.YoYCapFloorTermPriceSurface_capStrikes(swigCPtr, this), true); 142 } 143 144 public DoubleVector floorStrikes() { 145 return new DoubleVector(QuantLibJNI.YoYCapFloorTermPriceSurface_floorStrikes(swigCPtr, this), true); 146 } 147 148 public PeriodVector maturities() { 149 return new PeriodVector(QuantLibJNI.YoYCapFloorTermPriceSurface_maturities(swigCPtr, this), true); 150 } 151 152 public double minStrike() { 153 return QuantLibJNI.YoYCapFloorTermPriceSurface_minStrike(swigCPtr, this); 154 } 155 156 public double maxStrike() { 157 return QuantLibJNI.YoYCapFloorTermPriceSurface_maxStrike(swigCPtr, this); 158 } 159 160 public Date minMaturity() { 161 return new Date(QuantLibJNI.YoYCapFloorTermPriceSurface_minMaturity(swigCPtr, this), true); 162 } 163 164 public Date maxMaturity() { 165 return new Date(QuantLibJNI.YoYCapFloorTermPriceSurface_maxMaturity(swigCPtr, this), true); 166 } 167 168 public Date yoyOptionDateFromTenor(Period p) { 169 return new Date(QuantLibJNI.YoYCapFloorTermPriceSurface_yoyOptionDateFromTenor(swigCPtr, this, Period.getCPtr(p), p), true); 170 } 171 172}