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 FuturesRateHelper extends RateHelper implements org.quantlib.helpers.QuantLibJNIHelpers.AutoCloseable { 012 private transient long swigCPtr; 013 private transient boolean swigCMemOwnDerived; 014 015 protected FuturesRateHelper(long cPtr, boolean cMemoryOwn) { 016 super(QuantLibJNI.FuturesRateHelper_SWIGSmartPtrUpcast(cPtr), true); 017 swigCMemOwnDerived = cMemoryOwn; 018 swigCPtr = cPtr; 019 } 020 021 protected static long getCPtr(FuturesRateHelper 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_FuturesRateHelper(swigCPtr); 040 } 041 swigCPtr = 0; 042 } 043 super.delete(); 044 } 045 046 public FuturesRateHelper(QuoteHandle price, Date iborStartDate, long nMonths, Calendar calendar, BusinessDayConvention convention, boolean endOfMonth, DayCounter dayCounter, QuoteHandle convexityAdjustment, Futures.Type type) { 047 this(QuantLibJNI.new_FuturesRateHelper__SWIG_0(QuoteHandle.getCPtr(price), price, Date.getCPtr(iborStartDate), iborStartDate, nMonths, Calendar.getCPtr(calendar), calendar, convention.swigValue(), endOfMonth, DayCounter.getCPtr(dayCounter), dayCounter, QuoteHandle.getCPtr(convexityAdjustment), convexityAdjustment, type.swigValue()), true); 048 } 049 050 public FuturesRateHelper(QuoteHandle price, Date iborStartDate, long nMonths, Calendar calendar, BusinessDayConvention convention, boolean endOfMonth, DayCounter dayCounter, QuoteHandle convexityAdjustment) { 051 this(QuantLibJNI.new_FuturesRateHelper__SWIG_1(QuoteHandle.getCPtr(price), price, Date.getCPtr(iborStartDate), iborStartDate, nMonths, Calendar.getCPtr(calendar), calendar, convention.swigValue(), endOfMonth, DayCounter.getCPtr(dayCounter), dayCounter, QuoteHandle.getCPtr(convexityAdjustment), convexityAdjustment), true); 052 } 053 054 public FuturesRateHelper(QuoteHandle price, Date iborStartDate, long nMonths, Calendar calendar, BusinessDayConvention convention, boolean endOfMonth, DayCounter dayCounter) { 055 this(QuantLibJNI.new_FuturesRateHelper__SWIG_2(QuoteHandle.getCPtr(price), price, Date.getCPtr(iborStartDate), iborStartDate, nMonths, Calendar.getCPtr(calendar), calendar, convention.swigValue(), endOfMonth, DayCounter.getCPtr(dayCounter), dayCounter), true); 056 } 057 058 public FuturesRateHelper(double price, Date iborStartDate, long nMonths, Calendar calendar, BusinessDayConvention convention, boolean endOfMonth, DayCounter dayCounter, double convexityAdjustment, Futures.Type type) { 059 this(QuantLibJNI.new_FuturesRateHelper__SWIG_3(price, Date.getCPtr(iborStartDate), iborStartDate, nMonths, Calendar.getCPtr(calendar), calendar, convention.swigValue(), endOfMonth, DayCounter.getCPtr(dayCounter), dayCounter, convexityAdjustment, type.swigValue()), true); 060 } 061 062 public FuturesRateHelper(double price, Date iborStartDate, long nMonths, Calendar calendar, BusinessDayConvention convention, boolean endOfMonth, DayCounter dayCounter, double convexityAdjustment) { 063 this(QuantLibJNI.new_FuturesRateHelper__SWIG_4(price, Date.getCPtr(iborStartDate), iborStartDate, nMonths, Calendar.getCPtr(calendar), calendar, convention.swigValue(), endOfMonth, DayCounter.getCPtr(dayCounter), dayCounter, convexityAdjustment), true); 064 } 065 066 public FuturesRateHelper(double price, Date iborStartDate, long nMonths, Calendar calendar, BusinessDayConvention convention, boolean endOfMonth, DayCounter dayCounter) { 067 this(QuantLibJNI.new_FuturesRateHelper__SWIG_5(price, Date.getCPtr(iborStartDate), iborStartDate, nMonths, Calendar.getCPtr(calendar), calendar, convention.swigValue(), endOfMonth, DayCounter.getCPtr(dayCounter), dayCounter), true); 068 } 069 070 public FuturesRateHelper(QuoteHandle price, Date iborStartDate, Date iborEndDate, DayCounter dayCounter, QuoteHandle convexityAdjustment, Futures.Type type) { 071 this(QuantLibJNI.new_FuturesRateHelper__SWIG_6(QuoteHandle.getCPtr(price), price, Date.getCPtr(iborStartDate), iborStartDate, Date.getCPtr(iborEndDate), iborEndDate, DayCounter.getCPtr(dayCounter), dayCounter, QuoteHandle.getCPtr(convexityAdjustment), convexityAdjustment, type.swigValue()), true); 072 } 073 074 public FuturesRateHelper(QuoteHandle price, Date iborStartDate, Date iborEndDate, DayCounter dayCounter, QuoteHandle convexityAdjustment) { 075 this(QuantLibJNI.new_FuturesRateHelper__SWIG_7(QuoteHandle.getCPtr(price), price, Date.getCPtr(iborStartDate), iborStartDate, Date.getCPtr(iborEndDate), iborEndDate, DayCounter.getCPtr(dayCounter), dayCounter, QuoteHandle.getCPtr(convexityAdjustment), convexityAdjustment), true); 076 } 077 078 public FuturesRateHelper(QuoteHandle price, Date iborStartDate, Date iborEndDate, DayCounter dayCounter) { 079 this(QuantLibJNI.new_FuturesRateHelper__SWIG_8(QuoteHandle.getCPtr(price), price, Date.getCPtr(iborStartDate), iborStartDate, Date.getCPtr(iborEndDate), iborEndDate, DayCounter.getCPtr(dayCounter), dayCounter), true); 080 } 081 082 public FuturesRateHelper(double price, Date iborStartDate, Date iborEndDate, DayCounter dayCounter, double convexityAdjustment, Futures.Type type) { 083 this(QuantLibJNI.new_FuturesRateHelper__SWIG_9(price, Date.getCPtr(iborStartDate), iborStartDate, Date.getCPtr(iborEndDate), iborEndDate, DayCounter.getCPtr(dayCounter), dayCounter, convexityAdjustment, type.swigValue()), true); 084 } 085 086 public FuturesRateHelper(double price, Date iborStartDate, Date iborEndDate, DayCounter dayCounter, double convexityAdjustment) { 087 this(QuantLibJNI.new_FuturesRateHelper__SWIG_10(price, Date.getCPtr(iborStartDate), iborStartDate, Date.getCPtr(iborEndDate), iborEndDate, DayCounter.getCPtr(dayCounter), dayCounter, convexityAdjustment), true); 088 } 089 090 public FuturesRateHelper(double price, Date iborStartDate, Date iborEndDate, DayCounter dayCounter) { 091 this(QuantLibJNI.new_FuturesRateHelper__SWIG_11(price, Date.getCPtr(iborStartDate), iborStartDate, Date.getCPtr(iborEndDate), iborEndDate, DayCounter.getCPtr(dayCounter), dayCounter), true); 092 } 093 094 public FuturesRateHelper(QuoteHandle price, Date iborStartDate, IborIndex index, QuoteHandle convexityAdjustment, Futures.Type type) { 095 this(QuantLibJNI.new_FuturesRateHelper__SWIG_12(QuoteHandle.getCPtr(price), price, Date.getCPtr(iborStartDate), iborStartDate, IborIndex.getCPtr(index), index, QuoteHandle.getCPtr(convexityAdjustment), convexityAdjustment, type.swigValue()), true); 096 } 097 098 public FuturesRateHelper(QuoteHandle price, Date iborStartDate, IborIndex index, QuoteHandle convexityAdjustment) { 099 this(QuantLibJNI.new_FuturesRateHelper__SWIG_13(QuoteHandle.getCPtr(price), price, Date.getCPtr(iborStartDate), iborStartDate, IborIndex.getCPtr(index), index, QuoteHandle.getCPtr(convexityAdjustment), convexityAdjustment), true); 100 } 101 102 public FuturesRateHelper(QuoteHandle price, Date iborStartDate, IborIndex index) { 103 this(QuantLibJNI.new_FuturesRateHelper__SWIG_14(QuoteHandle.getCPtr(price), price, Date.getCPtr(iborStartDate), iborStartDate, IborIndex.getCPtr(index), index), true); 104 } 105 106 public FuturesRateHelper(double price, Date iborStartDate, IborIndex index, double convexityAdjustment, Futures.Type type) { 107 this(QuantLibJNI.new_FuturesRateHelper__SWIG_15(price, Date.getCPtr(iborStartDate), iborStartDate, IborIndex.getCPtr(index), index, convexityAdjustment, type.swigValue()), true); 108 } 109 110 public FuturesRateHelper(double price, Date iborStartDate, IborIndex index, double convexityAdjustment) { 111 this(QuantLibJNI.new_FuturesRateHelper__SWIG_16(price, Date.getCPtr(iborStartDate), iborStartDate, IborIndex.getCPtr(index), index, convexityAdjustment), true); 112 } 113 114 public FuturesRateHelper(double price, Date iborStartDate, IborIndex index) { 115 this(QuantLibJNI.new_FuturesRateHelper__SWIG_17(price, Date.getCPtr(iborStartDate), iborStartDate, IborIndex.getCPtr(index), index), true); 116 } 117 118}