/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (https://www.swig.org).
 * Version 4.1.1
 *
 * 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 QuantLib {
  public static double daysBetween(Date arg0, Date arg1) {
    return QuantLibJNI.daysBetween(Date.getCPtr(arg0), arg0, Date.getCPtr(arg1), arg1);
  }

  public static int nullInt() {
    return QuantLibJNI.nullInt();
  }

  public static double nullDouble() {
    return QuantLibJNI.nullDouble();
  }

  public static Date yearFractionToDate(DayCounter dayCounter, Date referenceDate, double t) {
    return new Date(QuantLibJNI.yearFractionToDate(DayCounter.getCPtr(dayCounter), dayCounter, Date.getCPtr(referenceDate), referenceDate, t), true);
  }

  public static Matrix inverse(Matrix m) {
    return new Matrix(QuantLibJNI.inverse(Matrix.getCPtr(m), m), true);
  }

  public static Matrix transpose(Matrix m) {
    return new Matrix(QuantLibJNI.transpose(Matrix.getCPtr(m), m), true);
  }

  public static Matrix outerProduct(Array v1, Array v2) {
    return new Matrix(QuantLibJNI.outerProduct(Array.getCPtr(v1), v1, Array.getCPtr(v2), v2), true);
  }

  public static Matrix pseudoSqrt(Matrix m, SalvagingAlgorithm.Type a) {
    return new Matrix(QuantLibJNI.pseudoSqrt(Matrix.getCPtr(m), m, a.swigValue()), true);
  }

  public static boolean close(double x, double y) {
    return QuantLibJNI.close__SWIG_0(x, y);
  }

  public static boolean close(double x, double y, long n) {
    return QuantLibJNI.close__SWIG_1(x, y, n);
  }

  public static boolean close_enough(double x, double y) {
    return QuantLibJNI.close_enough__SWIG_0(x, y);
  }

  public static boolean close_enough(double x, double y, long n) {
    return QuantLibJNI.close_enough__SWIG_1(x, y, n);
  }

  public static IborIndex as_iborindex(InterestRateIndex index) {
    long cPtr = QuantLibJNI.as_iborindex(InterestRateIndex.getCPtr(index), index);
    return (cPtr == 0) ? null : new IborIndex(cPtr, true);
  }

  public static SwapIndex as_swap_index(InterestRateIndex index) {
    long cPtr = QuantLibJNI.as_swap_index(InterestRateIndex.getCPtr(index), index);
    return (cPtr == 0) ? null : new SwapIndex(cPtr, true);
  }

  public static double sabrVolatility(double strike, double forward, double expiryTime, double alpha, double beta, double nu, double rho, VolatilityType volatilityType) {
    return QuantLibJNI.sabrVolatility__SWIG_0(strike, forward, expiryTime, alpha, beta, nu, rho, volatilityType.swigValue());
  }

  public static double sabrVolatility(double strike, double forward, double expiryTime, double alpha, double beta, double nu, double rho) {
    return QuantLibJNI.sabrVolatility__SWIG_1(strike, forward, expiryTime, alpha, beta, nu, rho);
  }

  public static double shiftedSabrVolatility(double strike, double forward, double expiryTime, double alpha, double beta, double nu, double rho, double shift, VolatilityType volatilityType) {
    return QuantLibJNI.shiftedSabrVolatility__SWIG_0(strike, forward, expiryTime, alpha, beta, nu, rho, shift, volatilityType.swigValue());
  }

  public static double shiftedSabrVolatility(double strike, double forward, double expiryTime, double alpha, double beta, double nu, double rho, double shift) {
    return QuantLibJNI.shiftedSabrVolatility__SWIG_1(strike, forward, expiryTime, alpha, beta, nu, rho, shift);
  }

  public static double sabrFlochKennedyVolatility(double strike, double forward, double expiryTime, double alpha, double beta, double nu, double rho) {
    return QuantLibJNI.sabrFlochKennedyVolatility(strike, forward, expiryTime, alpha, beta, nu, rho);
  }

  public static IndexedCashFlow as_indexed_cashflow(CashFlow cf) {
    long cPtr = QuantLibJNI.as_indexed_cashflow(CashFlow.getCPtr(cf), cf);
    return (cPtr == 0) ? null : new IndexedCashFlow(cPtr, true);
  }

  public static Coupon as_coupon(CashFlow cf) {
    long cPtr = QuantLibJNI.as_coupon(CashFlow.getCPtr(cf), cf);
    return (cPtr == 0) ? null : new Coupon(cPtr, true);
  }

  public static FixedRateCoupon as_fixed_rate_coupon(CashFlow cf) {
    long cPtr = QuantLibJNI.as_fixed_rate_coupon(CashFlow.getCPtr(cf), cf);
    return (cPtr == 0) ? null : new FixedRateCoupon(cPtr, true);
  }

  public static void setCouponPricer(Leg arg0, FloatingRateCouponPricer arg1) {
    QuantLibJNI.setCouponPricer__SWIG_0(Leg.getCPtr(arg0), arg0, FloatingRateCouponPricer.getCPtr(arg1), arg1);
  }

  public static FloatingRateCoupon as_floating_rate_coupon(CashFlow cf) {
    long cPtr = QuantLibJNI.as_floating_rate_coupon(CashFlow.getCPtr(cf), cf);
    return (cPtr == 0) ? null : new FloatingRateCoupon(cPtr, true);
  }

  public static OvernightIndexedCoupon as_overnight_indexed_coupon(CashFlow cf) {
    long cPtr = QuantLibJNI.as_overnight_indexed_coupon(CashFlow.getCPtr(cf), cf);
    return (cPtr == 0) ? null : new OvernightIndexedCoupon(cPtr, true);
  }

  public static SubPeriodsCoupon as_sub_periods_coupon(CashFlow cf) {
    long cPtr = QuantLibJNI.as_sub_periods_coupon(CashFlow.getCPtr(cf), cf);
    return (cPtr == 0) ? null : new SubPeriodsCoupon(cPtr, true);
  }

  public static void setCouponPricer(Leg arg0, EquityCashFlowPricer arg1) {
    QuantLibJNI.setCouponPricer__SWIG_1(Leg.getCPtr(arg0), arg0, EquityCashFlowPricer.getCPtr(arg1), arg1);
  }

  public static Leg FixedRateLeg(Schedule schedule, DayCounter dayCount, DoubleVector nominals, DoubleVector couponRates, BusinessDayConvention paymentAdjustment, DayCounter firstPeriodDayCount, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention, boolean exCouponEndOfMonth, Calendar paymentCalendar, int paymentLag, Compounding compounding, Frequency compoundingFrequency) {
    return new Leg(QuantLibJNI.FixedRateLeg__SWIG_0(Schedule.getCPtr(schedule), schedule, DayCounter.getCPtr(dayCount), dayCount, DoubleVector.getCPtr(nominals), nominals, DoubleVector.getCPtr(couponRates), couponRates, paymentAdjustment.swigValue(), DayCounter.getCPtr(firstPeriodDayCount), firstPeriodDayCount, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue(), exCouponEndOfMonth, Calendar.getCPtr(paymentCalendar), paymentCalendar, paymentLag, compounding.swigValue(), compoundingFrequency.swigValue()), true);
  }

  public static Leg FixedRateLeg(Schedule schedule, DayCounter dayCount, DoubleVector nominals, DoubleVector couponRates, BusinessDayConvention paymentAdjustment, DayCounter firstPeriodDayCount, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention, boolean exCouponEndOfMonth, Calendar paymentCalendar, int paymentLag, Compounding compounding) {
    return new Leg(QuantLibJNI.FixedRateLeg__SWIG_1(Schedule.getCPtr(schedule), schedule, DayCounter.getCPtr(dayCount), dayCount, DoubleVector.getCPtr(nominals), nominals, DoubleVector.getCPtr(couponRates), couponRates, paymentAdjustment.swigValue(), DayCounter.getCPtr(firstPeriodDayCount), firstPeriodDayCount, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue(), exCouponEndOfMonth, Calendar.getCPtr(paymentCalendar), paymentCalendar, paymentLag, compounding.swigValue()), true);
  }

  public static Leg FixedRateLeg(Schedule schedule, DayCounter dayCount, DoubleVector nominals, DoubleVector couponRates, BusinessDayConvention paymentAdjustment, DayCounter firstPeriodDayCount, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention, boolean exCouponEndOfMonth, Calendar paymentCalendar, int paymentLag) {
    return new Leg(QuantLibJNI.FixedRateLeg__SWIG_2(Schedule.getCPtr(schedule), schedule, DayCounter.getCPtr(dayCount), dayCount, DoubleVector.getCPtr(nominals), nominals, DoubleVector.getCPtr(couponRates), couponRates, paymentAdjustment.swigValue(), DayCounter.getCPtr(firstPeriodDayCount), firstPeriodDayCount, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue(), exCouponEndOfMonth, Calendar.getCPtr(paymentCalendar), paymentCalendar, paymentLag), true);
  }

  public static Leg FixedRateLeg(Schedule schedule, DayCounter dayCount, DoubleVector nominals, DoubleVector couponRates, BusinessDayConvention paymentAdjustment, DayCounter firstPeriodDayCount, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention, boolean exCouponEndOfMonth, Calendar paymentCalendar) {
    return new Leg(QuantLibJNI.FixedRateLeg__SWIG_3(Schedule.getCPtr(schedule), schedule, DayCounter.getCPtr(dayCount), dayCount, DoubleVector.getCPtr(nominals), nominals, DoubleVector.getCPtr(couponRates), couponRates, paymentAdjustment.swigValue(), DayCounter.getCPtr(firstPeriodDayCount), firstPeriodDayCount, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue(), exCouponEndOfMonth, Calendar.getCPtr(paymentCalendar), paymentCalendar), true);
  }

  public static Leg FixedRateLeg(Schedule schedule, DayCounter dayCount, DoubleVector nominals, DoubleVector couponRates, BusinessDayConvention paymentAdjustment, DayCounter firstPeriodDayCount, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention, boolean exCouponEndOfMonth) {
    return new Leg(QuantLibJNI.FixedRateLeg__SWIG_4(Schedule.getCPtr(schedule), schedule, DayCounter.getCPtr(dayCount), dayCount, DoubleVector.getCPtr(nominals), nominals, DoubleVector.getCPtr(couponRates), couponRates, paymentAdjustment.swigValue(), DayCounter.getCPtr(firstPeriodDayCount), firstPeriodDayCount, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue(), exCouponEndOfMonth), true);
  }

  public static Leg FixedRateLeg(Schedule schedule, DayCounter dayCount, DoubleVector nominals, DoubleVector couponRates, BusinessDayConvention paymentAdjustment, DayCounter firstPeriodDayCount, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention) {
    return new Leg(QuantLibJNI.FixedRateLeg__SWIG_5(Schedule.getCPtr(schedule), schedule, DayCounter.getCPtr(dayCount), dayCount, DoubleVector.getCPtr(nominals), nominals, DoubleVector.getCPtr(couponRates), couponRates, paymentAdjustment.swigValue(), DayCounter.getCPtr(firstPeriodDayCount), firstPeriodDayCount, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue()), true);
  }

  public static Leg FixedRateLeg(Schedule schedule, DayCounter dayCount, DoubleVector nominals, DoubleVector couponRates, BusinessDayConvention paymentAdjustment, DayCounter firstPeriodDayCount, Period exCouponPeriod, Calendar exCouponCalendar) {
    return new Leg(QuantLibJNI.FixedRateLeg__SWIG_6(Schedule.getCPtr(schedule), schedule, DayCounter.getCPtr(dayCount), dayCount, DoubleVector.getCPtr(nominals), nominals, DoubleVector.getCPtr(couponRates), couponRates, paymentAdjustment.swigValue(), DayCounter.getCPtr(firstPeriodDayCount), firstPeriodDayCount, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar), true);
  }

  public static Leg FixedRateLeg(Schedule schedule, DayCounter dayCount, DoubleVector nominals, DoubleVector couponRates, BusinessDayConvention paymentAdjustment, DayCounter firstPeriodDayCount, Period exCouponPeriod) {
    return new Leg(QuantLibJNI.FixedRateLeg__SWIG_7(Schedule.getCPtr(schedule), schedule, DayCounter.getCPtr(dayCount), dayCount, DoubleVector.getCPtr(nominals), nominals, DoubleVector.getCPtr(couponRates), couponRates, paymentAdjustment.swigValue(), DayCounter.getCPtr(firstPeriodDayCount), firstPeriodDayCount, Period.getCPtr(exCouponPeriod), exCouponPeriod), true);
  }

  public static Leg FixedRateLeg(Schedule schedule, DayCounter dayCount, DoubleVector nominals, DoubleVector couponRates, BusinessDayConvention paymentAdjustment, DayCounter firstPeriodDayCount) {
    return new Leg(QuantLibJNI.FixedRateLeg__SWIG_8(Schedule.getCPtr(schedule), schedule, DayCounter.getCPtr(dayCount), dayCount, DoubleVector.getCPtr(nominals), nominals, DoubleVector.getCPtr(couponRates), couponRates, paymentAdjustment.swigValue(), DayCounter.getCPtr(firstPeriodDayCount), firstPeriodDayCount), true);
  }

  public static Leg FixedRateLeg(Schedule schedule, DayCounter dayCount, DoubleVector nominals, DoubleVector couponRates, BusinessDayConvention paymentAdjustment) {
    return new Leg(QuantLibJNI.FixedRateLeg__SWIG_9(Schedule.getCPtr(schedule), schedule, DayCounter.getCPtr(dayCount), dayCount, DoubleVector.getCPtr(nominals), nominals, DoubleVector.getCPtr(couponRates), couponRates, paymentAdjustment.swigValue()), true);
  }

  public static Leg FixedRateLeg(Schedule schedule, DayCounter dayCount, DoubleVector nominals, DoubleVector couponRates) {
    return new Leg(QuantLibJNI.FixedRateLeg__SWIG_10(Schedule.getCPtr(schedule), schedule, DayCounter.getCPtr(dayCount), dayCount, DoubleVector.getCPtr(nominals), nominals, DoubleVector.getCPtr(couponRates), couponRates), true);
  }

  public static Leg IborLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors, boolean isInArrears, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention, boolean exCouponEndOfMonth, Calendar paymentCalendar, int paymentLag, OptionalBool withIndexedCoupons) {
    return new Leg(QuantLibJNI.IborLeg__SWIG_0(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, isInArrears, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue(), exCouponEndOfMonth, Calendar.getCPtr(paymentCalendar), paymentCalendar, paymentLag, OptionalBool.getCPtr(withIndexedCoupons), withIndexedCoupons), true);
  }

  public static Leg IborLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors, boolean isInArrears, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention, boolean exCouponEndOfMonth, Calendar paymentCalendar, int paymentLag) {
    return new Leg(QuantLibJNI.IborLeg__SWIG_1(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, isInArrears, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue(), exCouponEndOfMonth, Calendar.getCPtr(paymentCalendar), paymentCalendar, paymentLag), true);
  }

  public static Leg IborLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors, boolean isInArrears, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention, boolean exCouponEndOfMonth, Calendar paymentCalendar) {
    return new Leg(QuantLibJNI.IborLeg__SWIG_2(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, isInArrears, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue(), exCouponEndOfMonth, Calendar.getCPtr(paymentCalendar), paymentCalendar), true);
  }

  public static Leg IborLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors, boolean isInArrears, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention, boolean exCouponEndOfMonth) {
    return new Leg(QuantLibJNI.IborLeg__SWIG_3(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, isInArrears, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue(), exCouponEndOfMonth), true);
  }

  public static Leg IborLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors, boolean isInArrears, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention) {
    return new Leg(QuantLibJNI.IborLeg__SWIG_4(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, isInArrears, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue()), true);
  }

  public static Leg IborLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors, boolean isInArrears, Period exCouponPeriod, Calendar exCouponCalendar) {
    return new Leg(QuantLibJNI.IborLeg__SWIG_5(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, isInArrears, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar), true);
  }

  public static Leg IborLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors, boolean isInArrears, Period exCouponPeriod) {
    return new Leg(QuantLibJNI.IborLeg__SWIG_6(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, isInArrears, Period.getCPtr(exCouponPeriod), exCouponPeriod), true);
  }

  public static Leg IborLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors, boolean isInArrears) {
    return new Leg(QuantLibJNI.IborLeg__SWIG_7(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, isInArrears), true);
  }

  public static Leg IborLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors) {
    return new Leg(QuantLibJNI.IborLeg__SWIG_8(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors), true);
  }

  public static Leg IborLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps) {
    return new Leg(QuantLibJNI.IborLeg__SWIG_9(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps), true);
  }

  public static Leg IborLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads) {
    return new Leg(QuantLibJNI.IborLeg__SWIG_10(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads), true);
  }

  public static Leg IborLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings) {
    return new Leg(QuantLibJNI.IborLeg__SWIG_11(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings), true);
  }

  public static Leg IborLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays) {
    return new Leg(QuantLibJNI.IborLeg__SWIG_12(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays), true);
  }

  public static Leg IborLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention) {
    return new Leg(QuantLibJNI.IborLeg__SWIG_13(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue()), true);
  }

  public static Leg IborLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter) {
    return new Leg(QuantLibJNI.IborLeg__SWIG_14(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter), true);
  }

  public static Leg IborLeg(DoubleVector nominals, Schedule schedule, IborIndex index) {
    return new Leg(QuantLibJNI.IborLeg__SWIG_15(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index), true);
  }

  public static Leg OvernightLeg(DoubleVector nominals, Schedule schedule, OvernightIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, DoubleVector gearings, DoubleVector spreads, boolean telescopicValueDates, RateAveraging.Type averagingMethod, Calendar paymentCalendar, int paymentLag) {
    return new Leg(QuantLibJNI.OvernightLeg__SWIG_0(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, OvernightIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, telescopicValueDates, averagingMethod.swigValue(), Calendar.getCPtr(paymentCalendar), paymentCalendar, paymentLag), true);
  }

  public static Leg OvernightLeg(DoubleVector nominals, Schedule schedule, OvernightIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, DoubleVector gearings, DoubleVector spreads, boolean telescopicValueDates, RateAveraging.Type averagingMethod, Calendar paymentCalendar) {
    return new Leg(QuantLibJNI.OvernightLeg__SWIG_1(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, OvernightIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, telescopicValueDates, averagingMethod.swigValue(), Calendar.getCPtr(paymentCalendar), paymentCalendar), true);
  }

  public static Leg OvernightLeg(DoubleVector nominals, Schedule schedule, OvernightIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, DoubleVector gearings, DoubleVector spreads, boolean telescopicValueDates, RateAveraging.Type averagingMethod) {
    return new Leg(QuantLibJNI.OvernightLeg__SWIG_2(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, OvernightIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, telescopicValueDates, averagingMethod.swigValue()), true);
  }

  public static Leg OvernightLeg(DoubleVector nominals, Schedule schedule, OvernightIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, DoubleVector gearings, DoubleVector spreads, boolean telescopicValueDates) {
    return new Leg(QuantLibJNI.OvernightLeg__SWIG_3(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, OvernightIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, telescopicValueDates), true);
  }

  public static Leg OvernightLeg(DoubleVector nominals, Schedule schedule, OvernightIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, DoubleVector gearings, DoubleVector spreads) {
    return new Leg(QuantLibJNI.OvernightLeg__SWIG_4(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, OvernightIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads), true);
  }

  public static Leg OvernightLeg(DoubleVector nominals, Schedule schedule, OvernightIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, DoubleVector gearings) {
    return new Leg(QuantLibJNI.OvernightLeg__SWIG_5(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, OvernightIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), DoubleVector.getCPtr(gearings), gearings), true);
  }

  public static Leg OvernightLeg(DoubleVector nominals, Schedule schedule, OvernightIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention) {
    return new Leg(QuantLibJNI.OvernightLeg__SWIG_6(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, OvernightIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue()), true);
  }

  public static Leg OvernightLeg(DoubleVector nominals, Schedule schedule, OvernightIndex index, DayCounter paymentDayCounter) {
    return new Leg(QuantLibJNI.OvernightLeg__SWIG_7(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, OvernightIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter), true);
  }

  public static Leg OvernightLeg(DoubleVector nominals, Schedule schedule, OvernightIndex index) {
    return new Leg(QuantLibJNI.OvernightLeg__SWIG_8(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, OvernightIndex.getCPtr(index), index), true);
  }

  public static Leg CmsLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors, boolean isInArrears, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention, boolean exCouponEndOfMonth) {
    return new Leg(QuantLibJNI.CmsLeg__SWIG_0(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, isInArrears, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue(), exCouponEndOfMonth), true);
  }

  public static Leg CmsLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors, boolean isInArrears, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention) {
    return new Leg(QuantLibJNI.CmsLeg__SWIG_1(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, isInArrears, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue()), true);
  }

  public static Leg CmsLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors, boolean isInArrears, Period exCouponPeriod, Calendar exCouponCalendar) {
    return new Leg(QuantLibJNI.CmsLeg__SWIG_2(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, isInArrears, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar), true);
  }

  public static Leg CmsLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors, boolean isInArrears, Period exCouponPeriod) {
    return new Leg(QuantLibJNI.CmsLeg__SWIG_3(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, isInArrears, Period.getCPtr(exCouponPeriod), exCouponPeriod), true);
  }

  public static Leg CmsLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors, boolean isInArrears) {
    return new Leg(QuantLibJNI.CmsLeg__SWIG_4(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, isInArrears), true);
  }

  public static Leg CmsLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors) {
    return new Leg(QuantLibJNI.CmsLeg__SWIG_5(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors), true);
  }

  public static Leg CmsLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps) {
    return new Leg(QuantLibJNI.CmsLeg__SWIG_6(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps), true);
  }

  public static Leg CmsLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads) {
    return new Leg(QuantLibJNI.CmsLeg__SWIG_7(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads), true);
  }

  public static Leg CmsLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings) {
    return new Leg(QuantLibJNI.CmsLeg__SWIG_8(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings), true);
  }

  public static Leg CmsLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays) {
    return new Leg(QuantLibJNI.CmsLeg__SWIG_9(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays), true);
  }

  public static Leg CmsLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention) {
    return new Leg(QuantLibJNI.CmsLeg__SWIG_10(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue()), true);
  }

  public static Leg CmsLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter) {
    return new Leg(QuantLibJNI.CmsLeg__SWIG_11(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter), true);
  }

  public static Leg CmsLeg(DoubleVector nominals, Schedule schedule, SwapIndex index) {
    return new Leg(QuantLibJNI.CmsLeg__SWIG_12(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index), true);
  }

  public static Leg CmsZeroLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention, boolean exCouponEndOfMonth) {
    return new Leg(QuantLibJNI.CmsZeroLeg__SWIG_0(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue(), exCouponEndOfMonth), true);
  }

  public static Leg CmsZeroLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention) {
    return new Leg(QuantLibJNI.CmsZeroLeg__SWIG_1(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue()), true);
  }

  public static Leg CmsZeroLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors, Period exCouponPeriod, Calendar exCouponCalendar) {
    return new Leg(QuantLibJNI.CmsZeroLeg__SWIG_2(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar), true);
  }

  public static Leg CmsZeroLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors, Period exCouponPeriod) {
    return new Leg(QuantLibJNI.CmsZeroLeg__SWIG_3(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, Period.getCPtr(exCouponPeriod), exCouponPeriod), true);
  }

  public static Leg CmsZeroLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors) {
    return new Leg(QuantLibJNI.CmsZeroLeg__SWIG_4(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors), true);
  }

  public static Leg CmsZeroLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps) {
    return new Leg(QuantLibJNI.CmsZeroLeg__SWIG_5(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps), true);
  }

  public static Leg CmsZeroLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads) {
    return new Leg(QuantLibJNI.CmsZeroLeg__SWIG_6(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads), true);
  }

  public static Leg CmsZeroLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings) {
    return new Leg(QuantLibJNI.CmsZeroLeg__SWIG_7(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings), true);
  }

  public static Leg CmsZeroLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays) {
    return new Leg(QuantLibJNI.CmsZeroLeg__SWIG_8(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays), true);
  }

  public static Leg CmsZeroLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention) {
    return new Leg(QuantLibJNI.CmsZeroLeg__SWIG_9(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue()), true);
  }

  public static Leg CmsZeroLeg(DoubleVector nominals, Schedule schedule, SwapIndex index, DayCounter paymentDayCounter) {
    return new Leg(QuantLibJNI.CmsZeroLeg__SWIG_10(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter), true);
  }

  public static Leg CmsZeroLeg(DoubleVector nominals, Schedule schedule, SwapIndex index) {
    return new Leg(QuantLibJNI.CmsZeroLeg__SWIG_11(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapIndex.getCPtr(index), index), true);
  }

  public static Leg CmsSpreadLeg(DoubleVector nominals, Schedule schedule, SwapSpreadIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors, boolean isInArrears) {
    return new Leg(QuantLibJNI.CmsSpreadLeg__SWIG_0(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapSpreadIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, isInArrears), true);
  }

  public static Leg CmsSpreadLeg(DoubleVector nominals, Schedule schedule, SwapSpreadIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors) {
    return new Leg(QuantLibJNI.CmsSpreadLeg__SWIG_1(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapSpreadIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors), true);
  }

  public static Leg CmsSpreadLeg(DoubleVector nominals, Schedule schedule, SwapSpreadIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps) {
    return new Leg(QuantLibJNI.CmsSpreadLeg__SWIG_2(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapSpreadIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps), true);
  }

  public static Leg CmsSpreadLeg(DoubleVector nominals, Schedule schedule, SwapSpreadIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector spreads) {
    return new Leg(QuantLibJNI.CmsSpreadLeg__SWIG_3(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapSpreadIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads), true);
  }

  public static Leg CmsSpreadLeg(DoubleVector nominals, Schedule schedule, SwapSpreadIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays, DoubleVector gearings) {
    return new Leg(QuantLibJNI.CmsSpreadLeg__SWIG_4(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapSpreadIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings), true);
  }

  public static Leg CmsSpreadLeg(DoubleVector nominals, Schedule schedule, SwapSpreadIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, UnsignedIntVector fixingDays) {
    return new Leg(QuantLibJNI.CmsSpreadLeg__SWIG_5(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapSpreadIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), UnsignedIntVector.getCPtr(fixingDays), fixingDays), true);
  }

  public static Leg CmsSpreadLeg(DoubleVector nominals, Schedule schedule, SwapSpreadIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention) {
    return new Leg(QuantLibJNI.CmsSpreadLeg__SWIG_6(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapSpreadIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue()), true);
  }

  public static Leg CmsSpreadLeg(DoubleVector nominals, Schedule schedule, SwapSpreadIndex index, DayCounter paymentDayCounter) {
    return new Leg(QuantLibJNI.CmsSpreadLeg__SWIG_7(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapSpreadIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter), true);
  }

  public static Leg CmsSpreadLeg(DoubleVector nominals, Schedule schedule, SwapSpreadIndex index) {
    return new Leg(QuantLibJNI.CmsSpreadLeg__SWIG_8(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, SwapSpreadIndex.getCPtr(index), index), true);
  }

  public static Leg SubPeriodsLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, Calendar paymentCalendar, int paymentLag, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector couponSpreads, DoubleVector rateSpreads, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention, boolean exCouponEndOfMonth, RateAveraging.Type averagingMethod) {
    return new Leg(QuantLibJNI.SubPeriodsLeg__SWIG_0(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), Calendar.getCPtr(paymentCalendar), paymentCalendar, paymentLag, UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(couponSpreads), couponSpreads, DoubleVector.getCPtr(rateSpreads), rateSpreads, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue(), exCouponEndOfMonth, averagingMethod.swigValue()), true);
  }

  public static Leg SubPeriodsLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, Calendar paymentCalendar, int paymentLag, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector couponSpreads, DoubleVector rateSpreads, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention, boolean exCouponEndOfMonth) {
    return new Leg(QuantLibJNI.SubPeriodsLeg__SWIG_1(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), Calendar.getCPtr(paymentCalendar), paymentCalendar, paymentLag, UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(couponSpreads), couponSpreads, DoubleVector.getCPtr(rateSpreads), rateSpreads, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue(), exCouponEndOfMonth), true);
  }

  public static Leg SubPeriodsLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, Calendar paymentCalendar, int paymentLag, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector couponSpreads, DoubleVector rateSpreads, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention) {
    return new Leg(QuantLibJNI.SubPeriodsLeg__SWIG_2(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), Calendar.getCPtr(paymentCalendar), paymentCalendar, paymentLag, UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(couponSpreads), couponSpreads, DoubleVector.getCPtr(rateSpreads), rateSpreads, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue()), true);
  }

  public static Leg SubPeriodsLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, Calendar paymentCalendar, int paymentLag, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector couponSpreads, DoubleVector rateSpreads, Period exCouponPeriod, Calendar exCouponCalendar) {
    return new Leg(QuantLibJNI.SubPeriodsLeg__SWIG_3(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), Calendar.getCPtr(paymentCalendar), paymentCalendar, paymentLag, UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(couponSpreads), couponSpreads, DoubleVector.getCPtr(rateSpreads), rateSpreads, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar), true);
  }

  public static Leg SubPeriodsLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, Calendar paymentCalendar, int paymentLag, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector couponSpreads, DoubleVector rateSpreads, Period exCouponPeriod) {
    return new Leg(QuantLibJNI.SubPeriodsLeg__SWIG_4(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), Calendar.getCPtr(paymentCalendar), paymentCalendar, paymentLag, UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(couponSpreads), couponSpreads, DoubleVector.getCPtr(rateSpreads), rateSpreads, Period.getCPtr(exCouponPeriod), exCouponPeriod), true);
  }

  public static Leg SubPeriodsLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, Calendar paymentCalendar, int paymentLag, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector couponSpreads, DoubleVector rateSpreads) {
    return new Leg(QuantLibJNI.SubPeriodsLeg__SWIG_5(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), Calendar.getCPtr(paymentCalendar), paymentCalendar, paymentLag, UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(couponSpreads), couponSpreads, DoubleVector.getCPtr(rateSpreads), rateSpreads), true);
  }

  public static Leg SubPeriodsLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, Calendar paymentCalendar, int paymentLag, UnsignedIntVector fixingDays, DoubleVector gearings, DoubleVector couponSpreads) {
    return new Leg(QuantLibJNI.SubPeriodsLeg__SWIG_6(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), Calendar.getCPtr(paymentCalendar), paymentCalendar, paymentLag, UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(couponSpreads), couponSpreads), true);
  }

  public static Leg SubPeriodsLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, Calendar paymentCalendar, int paymentLag, UnsignedIntVector fixingDays, DoubleVector gearings) {
    return new Leg(QuantLibJNI.SubPeriodsLeg__SWIG_7(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), Calendar.getCPtr(paymentCalendar), paymentCalendar, paymentLag, UnsignedIntVector.getCPtr(fixingDays), fixingDays, DoubleVector.getCPtr(gearings), gearings), true);
  }

  public static Leg SubPeriodsLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, Calendar paymentCalendar, int paymentLag, UnsignedIntVector fixingDays) {
    return new Leg(QuantLibJNI.SubPeriodsLeg__SWIG_8(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), Calendar.getCPtr(paymentCalendar), paymentCalendar, paymentLag, UnsignedIntVector.getCPtr(fixingDays), fixingDays), true);
  }

  public static Leg SubPeriodsLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, Calendar paymentCalendar, int paymentLag) {
    return new Leg(QuantLibJNI.SubPeriodsLeg__SWIG_9(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), Calendar.getCPtr(paymentCalendar), paymentCalendar, paymentLag), true);
  }

  public static Leg SubPeriodsLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, Calendar paymentCalendar) {
    return new Leg(QuantLibJNI.SubPeriodsLeg__SWIG_10(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), Calendar.getCPtr(paymentCalendar), paymentCalendar), true);
  }

  public static Leg SubPeriodsLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention) {
    return new Leg(QuantLibJNI.SubPeriodsLeg__SWIG_11(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue()), true);
  }

  public static Leg SubPeriodsLeg(DoubleVector nominals, Schedule schedule, IborIndex index, DayCounter paymentDayCounter) {
    return new Leg(QuantLibJNI.SubPeriodsLeg__SWIG_12(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter), true);
  }

  public static Leg SubPeriodsLeg(DoubleVector nominals, Schedule schedule, IborIndex index) {
    return new Leg(QuantLibJNI.SubPeriodsLeg__SWIG_13(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, IborIndex.getCPtr(index), index), true);
  }

  public static GsrProcess as_gsr_process(StochasticProcess proc) {
    long cPtr = QuantLibJNI.as_gsr_process(StochasticProcess.getCPtr(proc), proc);
    return (cPtr == 0) ? null : new GsrProcess(cPtr, true);
  }

  public static PlainVanillaPayoff as_plain_vanilla_payoff(Payoff payoff) {
    long cPtr = QuantLibJNI.as_plain_vanilla_payoff(Payoff.getCPtr(payoff), payoff);
    return (cPtr == 0) ? null : new PlainVanillaPayoff(cPtr, true);
  }

  public static double blackFormula(Option.Type optionType, double strike, double forward, double stdDev, double discount, double displacement) {
    return QuantLibJNI.blackFormula__SWIG_0(optionType.swigValue(), strike, forward, stdDev, discount, displacement);
  }

  public static double blackFormula(Option.Type optionType, double strike, double forward, double stdDev, double discount) {
    return QuantLibJNI.blackFormula__SWIG_1(optionType.swigValue(), strike, forward, stdDev, discount);
  }

  public static double blackFormula(Option.Type optionType, double strike, double forward, double stdDev) {
    return QuantLibJNI.blackFormula__SWIG_2(optionType.swigValue(), strike, forward, stdDev);
  }

  public static double blackFormulaImpliedStdDev(Option.Type optionType, double strike, double forward, double blackPrice, double discount, double displacement, double guess, double accuracy, long maxIterations) {
    return QuantLibJNI.blackFormulaImpliedStdDev__SWIG_0(optionType.swigValue(), strike, forward, blackPrice, discount, displacement, guess, accuracy, maxIterations);
  }

  public static double blackFormulaImpliedStdDev(Option.Type optionType, double strike, double forward, double blackPrice, double discount, double displacement, double guess, double accuracy) {
    return QuantLibJNI.blackFormulaImpliedStdDev__SWIG_1(optionType.swigValue(), strike, forward, blackPrice, discount, displacement, guess, accuracy);
  }

  public static double blackFormulaImpliedStdDev(Option.Type optionType, double strike, double forward, double blackPrice, double discount, double displacement, double guess) {
    return QuantLibJNI.blackFormulaImpliedStdDev__SWIG_2(optionType.swigValue(), strike, forward, blackPrice, discount, displacement, guess);
  }

  public static double blackFormulaImpliedStdDev(Option.Type optionType, double strike, double forward, double blackPrice, double discount, double displacement) {
    return QuantLibJNI.blackFormulaImpliedStdDev__SWIG_3(optionType.swigValue(), strike, forward, blackPrice, discount, displacement);
  }

  public static double blackFormulaImpliedStdDev(Option.Type optionType, double strike, double forward, double blackPrice, double discount) {
    return QuantLibJNI.blackFormulaImpliedStdDev__SWIG_4(optionType.swigValue(), strike, forward, blackPrice, discount);
  }

  public static double blackFormulaImpliedStdDev(Option.Type optionType, double strike, double forward, double blackPrice) {
    return QuantLibJNI.blackFormulaImpliedStdDev__SWIG_5(optionType.swigValue(), strike, forward, blackPrice);
  }

  public static double blackFormulaImpliedStdDevLiRS(Option.Type optionType, double strike, double forward, double blackPrice, double discount, double displacement, double guess, double omega, double accuracy, long maxIterations) {
    return QuantLibJNI.blackFormulaImpliedStdDevLiRS__SWIG_0(optionType.swigValue(), strike, forward, blackPrice, discount, displacement, guess, omega, accuracy, maxIterations);
  }

  public static double blackFormulaImpliedStdDevLiRS(Option.Type optionType, double strike, double forward, double blackPrice, double discount, double displacement, double guess, double omega, double accuracy) {
    return QuantLibJNI.blackFormulaImpliedStdDevLiRS__SWIG_1(optionType.swigValue(), strike, forward, blackPrice, discount, displacement, guess, omega, accuracy);
  }

  public static double blackFormulaImpliedStdDevLiRS(Option.Type optionType, double strike, double forward, double blackPrice, double discount, double displacement, double guess, double omega) {
    return QuantLibJNI.blackFormulaImpliedStdDevLiRS__SWIG_2(optionType.swigValue(), strike, forward, blackPrice, discount, displacement, guess, omega);
  }

  public static double blackFormulaImpliedStdDevLiRS(Option.Type optionType, double strike, double forward, double blackPrice, double discount, double displacement, double guess) {
    return QuantLibJNI.blackFormulaImpliedStdDevLiRS__SWIG_3(optionType.swigValue(), strike, forward, blackPrice, discount, displacement, guess);
  }

  public static double blackFormulaImpliedStdDevLiRS(Option.Type optionType, double strike, double forward, double blackPrice, double discount, double displacement) {
    return QuantLibJNI.blackFormulaImpliedStdDevLiRS__SWIG_4(optionType.swigValue(), strike, forward, blackPrice, discount, displacement);
  }

  public static double blackFormulaImpliedStdDevLiRS(Option.Type optionType, double strike, double forward, double blackPrice, double discount) {
    return QuantLibJNI.blackFormulaImpliedStdDevLiRS__SWIG_5(optionType.swigValue(), strike, forward, blackPrice, discount);
  }

  public static double blackFormulaImpliedStdDevLiRS(Option.Type optionType, double strike, double forward, double blackPrice) {
    return QuantLibJNI.blackFormulaImpliedStdDevLiRS__SWIG_6(optionType.swigValue(), strike, forward, blackPrice);
  }

  public static double blackFormulaImpliedStdDevLiRS(PlainVanillaPayoff payoff, double forward, double blackPrice, double discount, double displacement, double guess, double omega, double accuracy, long maxIterations) {
    return QuantLibJNI.blackFormulaImpliedStdDevLiRS__SWIG_7(PlainVanillaPayoff.getCPtr(payoff), payoff, forward, blackPrice, discount, displacement, guess, omega, accuracy, maxIterations);
  }

  public static double blackFormulaImpliedStdDevLiRS(PlainVanillaPayoff payoff, double forward, double blackPrice, double discount, double displacement, double guess, double omega, double accuracy) {
    return QuantLibJNI.blackFormulaImpliedStdDevLiRS__SWIG_8(PlainVanillaPayoff.getCPtr(payoff), payoff, forward, blackPrice, discount, displacement, guess, omega, accuracy);
  }

  public static double blackFormulaImpliedStdDevLiRS(PlainVanillaPayoff payoff, double forward, double blackPrice, double discount, double displacement, double guess, double omega) {
    return QuantLibJNI.blackFormulaImpliedStdDevLiRS__SWIG_9(PlainVanillaPayoff.getCPtr(payoff), payoff, forward, blackPrice, discount, displacement, guess, omega);
  }

  public static double blackFormulaImpliedStdDevLiRS(PlainVanillaPayoff payoff, double forward, double blackPrice, double discount, double displacement, double guess) {
    return QuantLibJNI.blackFormulaImpliedStdDevLiRS__SWIG_10(PlainVanillaPayoff.getCPtr(payoff), payoff, forward, blackPrice, discount, displacement, guess);
  }

  public static double blackFormulaImpliedStdDevLiRS(PlainVanillaPayoff payoff, double forward, double blackPrice, double discount, double displacement) {
    return QuantLibJNI.blackFormulaImpliedStdDevLiRS__SWIG_11(PlainVanillaPayoff.getCPtr(payoff), payoff, forward, blackPrice, discount, displacement);
  }

  public static double blackFormulaImpliedStdDevLiRS(PlainVanillaPayoff payoff, double forward, double blackPrice, double discount) {
    return QuantLibJNI.blackFormulaImpliedStdDevLiRS__SWIG_12(PlainVanillaPayoff.getCPtr(payoff), payoff, forward, blackPrice, discount);
  }

  public static double blackFormulaImpliedStdDevLiRS(PlainVanillaPayoff payoff, double forward, double blackPrice) {
    return QuantLibJNI.blackFormulaImpliedStdDevLiRS__SWIG_13(PlainVanillaPayoff.getCPtr(payoff), payoff, forward, blackPrice);
  }

  public static double blackFormulaCashItmProbability(Option.Type optionType, double strike, double forward, double stdDev, double displacement) {
    return QuantLibJNI.blackFormulaCashItmProbability__SWIG_0(optionType.swigValue(), strike, forward, stdDev, displacement);
  }

  public static double blackFormulaCashItmProbability(Option.Type optionType, double strike, double forward, double stdDev) {
    return QuantLibJNI.blackFormulaCashItmProbability__SWIG_1(optionType.swigValue(), strike, forward, stdDev);
  }

  public static double blackFormulaCashItmProbability(PlainVanillaPayoff payoff, double forward, double stdDev, double displacement) {
    return QuantLibJNI.blackFormulaCashItmProbability__SWIG_2(PlainVanillaPayoff.getCPtr(payoff), payoff, forward, stdDev, displacement);
  }

  public static double blackFormulaCashItmProbability(PlainVanillaPayoff payoff, double forward, double stdDev) {
    return QuantLibJNI.blackFormulaCashItmProbability__SWIG_3(PlainVanillaPayoff.getCPtr(payoff), payoff, forward, stdDev);
  }

  public static double blackFormulaAssetItmProbability(Option.Type optionType, double strike, double forward, double stdDev, double displacement) {
    return QuantLibJNI.blackFormulaAssetItmProbability__SWIG_0(optionType.swigValue(), strike, forward, stdDev, displacement);
  }

  public static double blackFormulaAssetItmProbability(Option.Type optionType, double strike, double forward, double stdDev) {
    return QuantLibJNI.blackFormulaAssetItmProbability__SWIG_1(optionType.swigValue(), strike, forward, stdDev);
  }

  public static double blackFormulaAssetItmProbability(PlainVanillaPayoff payoff, double forward, double stdDev, double displacement) {
    return QuantLibJNI.blackFormulaAssetItmProbability__SWIG_2(PlainVanillaPayoff.getCPtr(payoff), payoff, forward, stdDev, displacement);
  }

  public static double blackFormulaAssetItmProbability(PlainVanillaPayoff payoff, double forward, double stdDev) {
    return QuantLibJNI.blackFormulaAssetItmProbability__SWIG_3(PlainVanillaPayoff.getCPtr(payoff), payoff, forward, stdDev);
  }

  public static double bachelierBlackFormula(Option.Type optionType, double strike, double forward, double stdDev, double discount) {
    return QuantLibJNI.bachelierBlackFormula__SWIG_0(optionType.swigValue(), strike, forward, stdDev, discount);
  }

  public static double bachelierBlackFormula(Option.Type optionType, double strike, double forward, double stdDev) {
    return QuantLibJNI.bachelierBlackFormula__SWIG_1(optionType.swigValue(), strike, forward, stdDev);
  }

  public static double bachelierBlackFormulaImpliedVol(Option.Type optionType, double strike, double forward, double tte, double bachelierPrice, double discount) {
    return QuantLibJNI.bachelierBlackFormulaImpliedVol__SWIG_0(optionType.swigValue(), strike, forward, tte, bachelierPrice, discount);
  }

  public static double bachelierBlackFormulaImpliedVol(Option.Type optionType, double strike, double forward, double tte, double bachelierPrice) {
    return QuantLibJNI.bachelierBlackFormulaImpliedVol__SWIG_1(optionType.swigValue(), strike, forward, tte, bachelierPrice);
  }

  public static double bachelierBlackFormulaAssetItmProbability(Option.Type optionType, double strike, double forward, double stdDev) {
    return QuantLibJNI.bachelierBlackFormulaAssetItmProbability__SWIG_0(optionType.swigValue(), strike, forward, stdDev);
  }

  public static double bachelierBlackFormulaAssetItmProbability(PlainVanillaPayoff payoff, double forward, double stdDev) {
    return QuantLibJNI.bachelierBlackFormulaAssetItmProbability__SWIG_1(PlainVanillaPayoff.getCPtr(payoff), payoff, forward, stdDev);
  }

  public static void simplifyNotificationGraph(Swap swap, boolean unregisterCoupons) {
    QuantLibJNI.simplifyNotificationGraph__SWIG_0(Swap.getCPtr(swap), swap, unregisterCoupons);
  }

  public static void simplifyNotificationGraph(Swap swap) {
    QuantLibJNI.simplifyNotificationGraph__SWIG_1(Swap.getCPtr(swap), swap);
  }

  public static OvernightIndexedSwap as_overnight_swap_index(InterestRateIndex index) {
    long cPtr = QuantLibJNI.as_overnight_swap_index(InterestRateIndex.getCPtr(index), index);
    return (cPtr == 0) ? null : new OvernightIndexedSwap(cPtr, true);
  }

  public static ZeroInflationIndex as_zero_inflation_index(Index i) {
    long cPtr = QuantLibJNI.as_zero_inflation_index(Index.getCPtr(i), i);
    return (cPtr == 0) ? null : new ZeroInflationIndex(cPtr, true);
  }

  public static InflationCoupon as_inflation_coupon(CashFlow cf) {
    long cPtr = QuantLibJNI.as_inflation_coupon(CashFlow.getCPtr(cf), cf);
    return (cPtr == 0) ? null : new InflationCoupon(cPtr, true);
  }

  public static CPICoupon as_cpi_coupon(CashFlow cf) {
    long cPtr = QuantLibJNI.as_cpi_coupon(CashFlow.getCPtr(cf), cf);
    return (cPtr == 0) ? null : new CPICoupon(cPtr, true);
  }

  public static CPICashFlow as_cpi_cashflow(CashFlow cf) {
    long cPtr = QuantLibJNI.as_cpi_cashflow(CashFlow.getCPtr(cf), cf);
    return (cPtr == 0) ? null : new CPICashFlow(cPtr, true);
  }

  public static Leg CPILeg(DoubleVector nominals, Schedule schedule, ZeroInflationIndex index, double baseCPI, Period observationLag, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, DoubleVector fixedRates, DoubleVector spreads, DoubleVector caps, DoubleVector floors, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention, boolean exCouponEndOfMonth, Calendar paymentCalendar, boolean growthOnly, CPI.InterpolationType observationInterpolation) {
    return new Leg(QuantLibJNI.CPILeg__SWIG_0(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, ZeroInflationIndex.getCPtr(index), index, baseCPI, Period.getCPtr(observationLag), observationLag, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), DoubleVector.getCPtr(fixedRates), fixedRates, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue(), exCouponEndOfMonth, Calendar.getCPtr(paymentCalendar), paymentCalendar, growthOnly, observationInterpolation.swigValue()), true);
  }

  public static Leg CPILeg(DoubleVector nominals, Schedule schedule, ZeroInflationIndex index, double baseCPI, Period observationLag, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, DoubleVector fixedRates, DoubleVector spreads, DoubleVector caps, DoubleVector floors, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention, boolean exCouponEndOfMonth, Calendar paymentCalendar, boolean growthOnly) {
    return new Leg(QuantLibJNI.CPILeg__SWIG_1(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, ZeroInflationIndex.getCPtr(index), index, baseCPI, Period.getCPtr(observationLag), observationLag, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), DoubleVector.getCPtr(fixedRates), fixedRates, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue(), exCouponEndOfMonth, Calendar.getCPtr(paymentCalendar), paymentCalendar, growthOnly), true);
  }

  public static Leg CPILeg(DoubleVector nominals, Schedule schedule, ZeroInflationIndex index, double baseCPI, Period observationLag, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, DoubleVector fixedRates, DoubleVector spreads, DoubleVector caps, DoubleVector floors, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention, boolean exCouponEndOfMonth, Calendar paymentCalendar) {
    return new Leg(QuantLibJNI.CPILeg__SWIG_2(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, ZeroInflationIndex.getCPtr(index), index, baseCPI, Period.getCPtr(observationLag), observationLag, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), DoubleVector.getCPtr(fixedRates), fixedRates, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue(), exCouponEndOfMonth, Calendar.getCPtr(paymentCalendar), paymentCalendar), true);
  }

  public static Leg CPILeg(DoubleVector nominals, Schedule schedule, ZeroInflationIndex index, double baseCPI, Period observationLag, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, DoubleVector fixedRates, DoubleVector spreads, DoubleVector caps, DoubleVector floors, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention, boolean exCouponEndOfMonth) {
    return new Leg(QuantLibJNI.CPILeg__SWIG_3(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, ZeroInflationIndex.getCPtr(index), index, baseCPI, Period.getCPtr(observationLag), observationLag, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), DoubleVector.getCPtr(fixedRates), fixedRates, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue(), exCouponEndOfMonth), true);
  }

  public static Leg CPILeg(DoubleVector nominals, Schedule schedule, ZeroInflationIndex index, double baseCPI, Period observationLag, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, DoubleVector fixedRates, DoubleVector spreads, DoubleVector caps, DoubleVector floors, Period exCouponPeriod, Calendar exCouponCalendar, BusinessDayConvention exCouponConvention) {
    return new Leg(QuantLibJNI.CPILeg__SWIG_4(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, ZeroInflationIndex.getCPtr(index), index, baseCPI, Period.getCPtr(observationLag), observationLag, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), DoubleVector.getCPtr(fixedRates), fixedRates, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar, exCouponConvention.swigValue()), true);
  }

  public static Leg CPILeg(DoubleVector nominals, Schedule schedule, ZeroInflationIndex index, double baseCPI, Period observationLag, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, DoubleVector fixedRates, DoubleVector spreads, DoubleVector caps, DoubleVector floors, Period exCouponPeriod, Calendar exCouponCalendar) {
    return new Leg(QuantLibJNI.CPILeg__SWIG_5(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, ZeroInflationIndex.getCPtr(index), index, baseCPI, Period.getCPtr(observationLag), observationLag, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), DoubleVector.getCPtr(fixedRates), fixedRates, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, Period.getCPtr(exCouponPeriod), exCouponPeriod, Calendar.getCPtr(exCouponCalendar), exCouponCalendar), true);
  }

  public static Leg CPILeg(DoubleVector nominals, Schedule schedule, ZeroInflationIndex index, double baseCPI, Period observationLag, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, DoubleVector fixedRates, DoubleVector spreads, DoubleVector caps, DoubleVector floors, Period exCouponPeriod) {
    return new Leg(QuantLibJNI.CPILeg__SWIG_6(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, ZeroInflationIndex.getCPtr(index), index, baseCPI, Period.getCPtr(observationLag), observationLag, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), DoubleVector.getCPtr(fixedRates), fixedRates, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors, Period.getCPtr(exCouponPeriod), exCouponPeriod), true);
  }

  public static Leg CPILeg(DoubleVector nominals, Schedule schedule, ZeroInflationIndex index, double baseCPI, Period observationLag, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, DoubleVector fixedRates, DoubleVector spreads, DoubleVector caps, DoubleVector floors) {
    return new Leg(QuantLibJNI.CPILeg__SWIG_7(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, ZeroInflationIndex.getCPtr(index), index, baseCPI, Period.getCPtr(observationLag), observationLag, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), DoubleVector.getCPtr(fixedRates), fixedRates, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors), true);
  }

  public static Leg CPILeg(DoubleVector nominals, Schedule schedule, ZeroInflationIndex index, double baseCPI, Period observationLag, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, DoubleVector fixedRates, DoubleVector spreads, DoubleVector caps) {
    return new Leg(QuantLibJNI.CPILeg__SWIG_8(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, ZeroInflationIndex.getCPtr(index), index, baseCPI, Period.getCPtr(observationLag), observationLag, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), DoubleVector.getCPtr(fixedRates), fixedRates, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps), true);
  }

  public static Leg CPILeg(DoubleVector nominals, Schedule schedule, ZeroInflationIndex index, double baseCPI, Period observationLag, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, DoubleVector fixedRates, DoubleVector spreads) {
    return new Leg(QuantLibJNI.CPILeg__SWIG_9(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, ZeroInflationIndex.getCPtr(index), index, baseCPI, Period.getCPtr(observationLag), observationLag, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), DoubleVector.getCPtr(fixedRates), fixedRates, DoubleVector.getCPtr(spreads), spreads), true);
  }

  public static Leg CPILeg(DoubleVector nominals, Schedule schedule, ZeroInflationIndex index, double baseCPI, Period observationLag, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, DoubleVector fixedRates) {
    return new Leg(QuantLibJNI.CPILeg__SWIG_10(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, ZeroInflationIndex.getCPtr(index), index, baseCPI, Period.getCPtr(observationLag), observationLag, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue(), DoubleVector.getCPtr(fixedRates), fixedRates), true);
  }

  public static Leg CPILeg(DoubleVector nominals, Schedule schedule, ZeroInflationIndex index, double baseCPI, Period observationLag, DayCounter paymentDayCounter, BusinessDayConvention paymentConvention) {
    return new Leg(QuantLibJNI.CPILeg__SWIG_11(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, ZeroInflationIndex.getCPtr(index), index, baseCPI, Period.getCPtr(observationLag), observationLag, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentConvention.swigValue()), true);
  }

  public static Leg CPILeg(DoubleVector nominals, Schedule schedule, ZeroInflationIndex index, double baseCPI, Period observationLag, DayCounter paymentDayCounter) {
    return new Leg(QuantLibJNI.CPILeg__SWIG_12(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, ZeroInflationIndex.getCPtr(index), index, baseCPI, Period.getCPtr(observationLag), observationLag, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter), true);
  }

  public static Leg CPILeg(DoubleVector nominals, Schedule schedule, ZeroInflationIndex index, double baseCPI, Period observationLag) {
    return new Leg(QuantLibJNI.CPILeg__SWIG_13(DoubleVector.getCPtr(nominals), nominals, Schedule.getCPtr(schedule), schedule, ZeroInflationIndex.getCPtr(index), index, baseCPI, Period.getCPtr(observationLag), observationLag), true);
  }

  public static ZeroInflationCashFlow as_zero_inflation_cash_flow(CashFlow cf) {
    long cPtr = QuantLibJNI.as_zero_inflation_cash_flow(CashFlow.getCPtr(cf), cf);
    return (cPtr == 0) ? null : new ZeroInflationCashFlow(cPtr, true);
  }

  public static DatePair inflationPeriod(Date d, Frequency f) {
    return new DatePair(QuantLibJNI.inflationPeriod(Date.getCPtr(d), d, f.swigValue()), true);
  }

  public static double inflationYearFraction(Frequency f, boolean indexIsInterpolated, DayCounter dayCount, Date d1, Date d2) {
    return QuantLibJNI.inflationYearFraction(f.swigValue(), indexIsInterpolated, DayCounter.getCPtr(dayCount), dayCount, Date.getCPtr(d1), d1, Date.getCPtr(d2), d2);
  }

  public static Date inflationBaseDate(Date referenceDate, Period observationLag, Frequency frequency, boolean indexIsInterpolated) {
    return new Date(QuantLibJNI.inflationBaseDate(Date.getCPtr(referenceDate), referenceDate, Period.getCPtr(observationLag), observationLag, frequency.swigValue(), indexIsInterpolated), true);
  }

  public static void setCouponPricer(Leg arg0, YoYInflationCouponPricer arg1) {
    QuantLibJNI.setCouponPricer__SWIG_2(Leg.getCPtr(arg0), arg0, YoYInflationCouponPricer.getCPtr(arg1), arg1);
  }

  public static YoYInflationCoupon as_yoy_inflation_coupon(CashFlow cf) {
    long cPtr = QuantLibJNI.as_yoy_inflation_coupon(CashFlow.getCPtr(cf), cf);
    return (cPtr == 0) ? null : new YoYInflationCoupon(cPtr, true);
  }

  public static CappedFlooredYoYInflationCoupon as_capped_floored_yoy_inflation_coupon(CashFlow cf) {
    long cPtr = QuantLibJNI.as_capped_floored_yoy_inflation_coupon(CashFlow.getCPtr(cf), cf);
    return (cPtr == 0) ? null : new CappedFlooredYoYInflationCoupon(cPtr, true);
  }

  public static Leg yoyInflationLeg(Schedule schedule, Calendar calendar, YoYInflationIndex index, Period observationLag, DoubleVector notionals, DayCounter paymentDayCounter, BusinessDayConvention paymentAdjustment, long fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps, DoubleVector floors) {
    return new Leg(QuantLibJNI.yoyInflationLeg__SWIG_0(Schedule.getCPtr(schedule), schedule, Calendar.getCPtr(calendar), calendar, YoYInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, DoubleVector.getCPtr(notionals), notionals, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentAdjustment.swigValue(), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps, DoubleVector.getCPtr(floors), floors), true);
  }

  public static Leg yoyInflationLeg(Schedule schedule, Calendar calendar, YoYInflationIndex index, Period observationLag, DoubleVector notionals, DayCounter paymentDayCounter, BusinessDayConvention paymentAdjustment, long fixingDays, DoubleVector gearings, DoubleVector spreads, DoubleVector caps) {
    return new Leg(QuantLibJNI.yoyInflationLeg__SWIG_1(Schedule.getCPtr(schedule), schedule, Calendar.getCPtr(calendar), calendar, YoYInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, DoubleVector.getCPtr(notionals), notionals, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentAdjustment.swigValue(), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads, DoubleVector.getCPtr(caps), caps), true);
  }

  public static Leg yoyInflationLeg(Schedule schedule, Calendar calendar, YoYInflationIndex index, Period observationLag, DoubleVector notionals, DayCounter paymentDayCounter, BusinessDayConvention paymentAdjustment, long fixingDays, DoubleVector gearings, DoubleVector spreads) {
    return new Leg(QuantLibJNI.yoyInflationLeg__SWIG_2(Schedule.getCPtr(schedule), schedule, Calendar.getCPtr(calendar), calendar, YoYInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, DoubleVector.getCPtr(notionals), notionals, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentAdjustment.swigValue(), fixingDays, DoubleVector.getCPtr(gearings), gearings, DoubleVector.getCPtr(spreads), spreads), true);
  }

  public static Leg yoyInflationLeg(Schedule schedule, Calendar calendar, YoYInflationIndex index, Period observationLag, DoubleVector notionals, DayCounter paymentDayCounter, BusinessDayConvention paymentAdjustment, long fixingDays, DoubleVector gearings) {
    return new Leg(QuantLibJNI.yoyInflationLeg__SWIG_3(Schedule.getCPtr(schedule), schedule, Calendar.getCPtr(calendar), calendar, YoYInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, DoubleVector.getCPtr(notionals), notionals, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentAdjustment.swigValue(), fixingDays, DoubleVector.getCPtr(gearings), gearings), true);
  }

  public static Leg yoyInflationLeg(Schedule schedule, Calendar calendar, YoYInflationIndex index, Period observationLag, DoubleVector notionals, DayCounter paymentDayCounter, BusinessDayConvention paymentAdjustment, long fixingDays) {
    return new Leg(QuantLibJNI.yoyInflationLeg__SWIG_4(Schedule.getCPtr(schedule), schedule, Calendar.getCPtr(calendar), calendar, YoYInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, DoubleVector.getCPtr(notionals), notionals, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentAdjustment.swigValue(), fixingDays), true);
  }

  public static Leg yoyInflationLeg(Schedule schedule, Calendar calendar, YoYInflationIndex index, Period observationLag, DoubleVector notionals, DayCounter paymentDayCounter, BusinessDayConvention paymentAdjustment) {
    return new Leg(QuantLibJNI.yoyInflationLeg__SWIG_5(Schedule.getCPtr(schedule), schedule, Calendar.getCPtr(calendar), calendar, YoYInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, DoubleVector.getCPtr(notionals), notionals, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter, paymentAdjustment.swigValue()), true);
  }

  public static Leg yoyInflationLeg(Schedule schedule, Calendar calendar, YoYInflationIndex index, Period observationLag, DoubleVector notionals, DayCounter paymentDayCounter) {
    return new Leg(QuantLibJNI.yoyInflationLeg__SWIG_6(Schedule.getCPtr(schedule), schedule, Calendar.getCPtr(calendar), calendar, YoYInflationIndex.getCPtr(index), index, Period.getCPtr(observationLag), observationLag, DoubleVector.getCPtr(notionals), notionals, DayCounter.getCPtr(paymentDayCounter), paymentDayCounter), true);
  }

  public static void simplifyNotificationGraph(Bond bond, boolean unregisterCoupons) {
    QuantLibJNI.simplifyNotificationGraph__SWIG_2(Bond.getCPtr(bond), bond, unregisterCoupons);
  }

  public static void simplifyNotificationGraph(Bond bond) {
    QuantLibJNI.simplifyNotificationGraph__SWIG_3(Bond.getCPtr(bond), bond);
  }

  public static double cleanPriceFromZSpread(Bond bond, YieldTermStructure discountCurve, double zSpread, DayCounter dc, Compounding compounding, Frequency freq, Date settlementDate) {
    return QuantLibJNI.cleanPriceFromZSpread__SWIG_0(Bond.getCPtr(bond), bond, YieldTermStructure.getCPtr(discountCurve), discountCurve, zSpread, DayCounter.getCPtr(dc), dc, compounding.swigValue(), freq.swigValue(), Date.getCPtr(settlementDate), settlementDate);
  }

  public static double cleanPriceFromZSpread(Bond bond, YieldTermStructure discountCurve, double zSpread, DayCounter dc, Compounding compounding, Frequency freq) {
    return QuantLibJNI.cleanPriceFromZSpread__SWIG_1(Bond.getCPtr(bond), bond, YieldTermStructure.getCPtr(discountCurve), discountCurve, zSpread, DayCounter.getCPtr(dc), dc, compounding.swigValue(), freq.swigValue());
  }

  public static Schedule sinkingSchedule(Date startDate, Period bondLength, Frequency frequency, Calendar paymentCalendar) {
    return new Schedule(QuantLibJNI.sinkingSchedule(Date.getCPtr(startDate), startDate, Period.getCPtr(bondLength), bondLength, frequency.swigValue(), Calendar.getCPtr(paymentCalendar), paymentCalendar), true);
  }

  public static DoubleVector sinkingNotionals(Period bondLength, Frequency frequency, double couponRate, double initialNotional) {
    return new DoubleVector(QuantLibJNI.sinkingNotionals(Period.getCPtr(bondLength), bondLength, frequency.swigValue(), couponRate, initialNotional), true);
  }

  public static BlackCalibrationHelper as_black_helper(CalibrationHelper h) {
    long cPtr = QuantLibJNI.as_black_helper(CalibrationHelper.getCPtr(h), h);
    return (cPtr == 0) ? null : new BlackCalibrationHelper(cPtr, true);
  }

  public static SWIGTYPE_p_ext__shared_ptrT_SwaptionHelper_t as_swaption_helper(BlackCalibrationHelper h) {
    return new SWIGTYPE_p_ext__shared_ptrT_SwaptionHelper_t(QuantLibJNI.as_swaption_helper(BlackCalibrationHelper.getCPtr(h), h), true);
  }

  public static DepositRateHelper as_depositratehelper(RateHelper helper) {
    long cPtr = QuantLibJNI.as_depositratehelper(RateHelper.getCPtr(helper), helper);
    return (cPtr == 0) ? null : new DepositRateHelper(cPtr, true);
  }

  public static FraRateHelper as_fraratehelper(RateHelper helper) {
    long cPtr = QuantLibJNI.as_fraratehelper(RateHelper.getCPtr(helper), helper);
    return (cPtr == 0) ? null : new FraRateHelper(cPtr, true);
  }

  public static SwapRateHelper as_swapratehelper(RateHelper helper) {
    long cPtr = QuantLibJNI.as_swapratehelper(RateHelper.getCPtr(helper), helper);
    return (cPtr == 0) ? null : new SwapRateHelper(cPtr, true);
  }

  public static OISRateHelper as_oisratehelper(RateHelper helper) {
    long cPtr = QuantLibJNI.as_oisratehelper(RateHelper.getCPtr(helper), helper);
    return (cPtr == 0) ? null : new OISRateHelper(cPtr, true);
  }

  public static ConstNotionalCrossCurrencyBasisSwapRateHelper as_constnotionalcrosscurrencybasisswapratehelper(RateHelper helper) {
    long cPtr = QuantLibJNI.as_constnotionalcrosscurrencybasisswapratehelper(RateHelper.getCPtr(helper), helper);
    return (cPtr == 0) ? null : new ConstNotionalCrossCurrencyBasisSwapRateHelper(cPtr, true);
  }

  public static MtMCrossCurrencyBasisSwapRateHelper as_mtmcrosscurrencybasisswapratehelper(RateHelper helper) {
    long cPtr = QuantLibJNI.as_mtmcrosscurrencybasisswapratehelper(RateHelper.getCPtr(helper), helper);
    return (cPtr == 0) ? null : new MtMCrossCurrencyBasisSwapRateHelper(cPtr, true);
  }

  public static void checkCompatibility(EvolutionDescription evolution, UnsignedIntVector numeraires) {
    QuantLibJNI.checkCompatibility(EvolutionDescription.getCPtr(evolution), evolution, UnsignedIntVector.getCPtr(numeraires), numeraires);
  }

  public static boolean isInTerminalMeasure(EvolutionDescription evolution, UnsignedIntVector numeraires) {
    return QuantLibJNI.isInTerminalMeasure(EvolutionDescription.getCPtr(evolution), evolution, UnsignedIntVector.getCPtr(numeraires), numeraires);
  }

  public static boolean isInMoneyMarketPlusMeasure(EvolutionDescription evolution, UnsignedIntVector numeraires, long offset) {
    return QuantLibJNI.isInMoneyMarketPlusMeasure__SWIG_0(EvolutionDescription.getCPtr(evolution), evolution, UnsignedIntVector.getCPtr(numeraires), numeraires, offset);
  }

  public static boolean isInMoneyMarketPlusMeasure(EvolutionDescription evolution, UnsignedIntVector numeraires) {
    return QuantLibJNI.isInMoneyMarketPlusMeasure__SWIG_1(EvolutionDescription.getCPtr(evolution), evolution, UnsignedIntVector.getCPtr(numeraires), numeraires);
  }

  public static boolean isInMoneyMarketMeasure(EvolutionDescription evolution, UnsignedIntVector numeraires) {
    return QuantLibJNI.isInMoneyMarketMeasure(EvolutionDescription.getCPtr(evolution), evolution, UnsignedIntVector.getCPtr(numeraires), numeraires);
  }

  public static UnsignedIntVector terminalMeasure(EvolutionDescription evolution) {
    return new UnsignedIntVector(QuantLibJNI.terminalMeasure(EvolutionDescription.getCPtr(evolution), evolution), true);
  }

  public static UnsignedIntVector moneyMarketPlusMeasure(EvolutionDescription evolution, long offset) {
    return new UnsignedIntVector(QuantLibJNI.moneyMarketPlusMeasure__SWIG_0(EvolutionDescription.getCPtr(evolution), evolution, offset), true);
  }

  public static UnsignedIntVector moneyMarketPlusMeasure(EvolutionDescription evolution) {
    return new UnsignedIntVector(QuantLibJNI.moneyMarketPlusMeasure__SWIG_1(EvolutionDescription.getCPtr(evolution), evolution), true);
  }

  public static UnsignedIntVector moneyMarketMeasure(EvolutionDescription evolution) {
    return new UnsignedIntVector(QuantLibJNI.moneyMarketMeasure(EvolutionDescription.getCPtr(evolution), evolution), true);
  }

  public static Matrix getCovariance(Array volatilities, Matrix correlations) {
    return new Matrix(QuantLibJNI.getCovariance(Array.getCPtr(volatilities), volatilities, Matrix.getCPtr(correlations), correlations), true);
  }

  public static void enableTracing() {
    QuantLibJNI.enableTracing();
  }

  public static void disableTracing() {
    QuantLibJNI.disableTracing();
  }

}
