/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.33
 *
 * 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 CashFlows {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  protected CashFlows(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(CashFlows obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if(swigCPtr != 0 && swigCMemOwn) {
      swigCMemOwn = false;
      QuantLibJNI.delete_CashFlows(swigCPtr);
    }
    swigCPtr = 0;
  }

  public static Date startDate(Leg arg0) {
    return new Date(QuantLibJNI.CashFlows_startDate(Leg.getCPtr(arg0), arg0), true);
  }

  public static Date maturityDate(Leg arg0) {
    return new Date(QuantLibJNI.CashFlows_maturityDate(Leg.getCPtr(arg0), arg0), true);
  }

  public static double npv(Leg arg0, SWIGTYPE_p_YieldTermStructure discountCurve, Date settlementDate, Date npvDate, int exDividendDays) {
    return QuantLibJNI.CashFlows_npv__SWIG_0(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(discountCurve), Date.getCPtr(settlementDate), settlementDate, Date.getCPtr(npvDate), npvDate, exDividendDays);
  }

  public static double npv(Leg arg0, SWIGTYPE_p_YieldTermStructure discountCurve, Date settlementDate, Date npvDate) {
    return QuantLibJNI.CashFlows_npv__SWIG_1(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(discountCurve), Date.getCPtr(settlementDate), settlementDate, Date.getCPtr(npvDate), npvDate);
  }

  public static double npv(Leg arg0, SWIGTYPE_p_YieldTermStructure discountCurve, Date settlementDate) {
    return QuantLibJNI.CashFlows_npv__SWIG_2(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(discountCurve), Date.getCPtr(settlementDate), settlementDate);
  }

  public static double npv(Leg arg0, SWIGTYPE_p_YieldTermStructure discountCurve) {
    return QuantLibJNI.CashFlows_npv__SWIG_3(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(discountCurve));
  }

  public static double npv(Leg arg0, InterestRate arg1, Date settlementDate) {
    return QuantLibJNI.CashFlows_npv__SWIG_4(Leg.getCPtr(arg0), arg0, InterestRate.getCPtr(arg1), arg1, Date.getCPtr(settlementDate), settlementDate);
  }

  public static double npv(Leg arg0, InterestRate arg1) {
    return QuantLibJNI.CashFlows_npv__SWIG_5(Leg.getCPtr(arg0), arg0, InterestRate.getCPtr(arg1), arg1);
  }

  public static double bps(Leg arg0, SWIGTYPE_p_YieldTermStructure discountCurve, Date settlementDate, Date npvDate, int exDividendDays) {
    return QuantLibJNI.CashFlows_bps__SWIG_0(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(discountCurve), Date.getCPtr(settlementDate), settlementDate, Date.getCPtr(npvDate), npvDate, exDividendDays);
  }

  public static double bps(Leg arg0, SWIGTYPE_p_YieldTermStructure discountCurve, Date settlementDate, Date npvDate) {
    return QuantLibJNI.CashFlows_bps__SWIG_1(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(discountCurve), Date.getCPtr(settlementDate), settlementDate, Date.getCPtr(npvDate), npvDate);
  }

  public static double bps(Leg arg0, SWIGTYPE_p_YieldTermStructure discountCurve, Date settlementDate) {
    return QuantLibJNI.CashFlows_bps__SWIG_2(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(discountCurve), Date.getCPtr(settlementDate), settlementDate);
  }

  public static double bps(Leg arg0, SWIGTYPE_p_YieldTermStructure discountCurve) {
    return QuantLibJNI.CashFlows_bps__SWIG_3(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(discountCurve));
  }

  public static double bps(Leg arg0, InterestRate arg1, Date settlementDate) {
    return QuantLibJNI.CashFlows_bps__SWIG_4(Leg.getCPtr(arg0), arg0, InterestRate.getCPtr(arg1), arg1, Date.getCPtr(settlementDate), settlementDate);
  }

  public static double bps(Leg arg0, InterestRate arg1) {
    return QuantLibJNI.CashFlows_bps__SWIG_5(Leg.getCPtr(arg0), arg0, InterestRate.getCPtr(arg1), arg1);
  }

  public static double atmRate(Leg arg0, SWIGTYPE_p_YieldTermStructure arg1, Date settlementDate, Date npvDate, int exDividendDays, double npv) {
    return QuantLibJNI.CashFlows_atmRate__SWIG_0(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(arg1), Date.getCPtr(settlementDate), settlementDate, Date.getCPtr(npvDate), npvDate, exDividendDays, npv);
  }

  public static double atmRate(Leg arg0, SWIGTYPE_p_YieldTermStructure arg1, Date settlementDate, Date npvDate, int exDividendDays) {
    return QuantLibJNI.CashFlows_atmRate__SWIG_1(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(arg1), Date.getCPtr(settlementDate), settlementDate, Date.getCPtr(npvDate), npvDate, exDividendDays);
  }

  public static double atmRate(Leg arg0, SWIGTYPE_p_YieldTermStructure arg1, Date settlementDate, Date npvDate) {
    return QuantLibJNI.CashFlows_atmRate__SWIG_2(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(arg1), Date.getCPtr(settlementDate), settlementDate, Date.getCPtr(npvDate), npvDate);
  }

  public static double atmRate(Leg arg0, SWIGTYPE_p_YieldTermStructure arg1, Date settlementDate) {
    return QuantLibJNI.CashFlows_atmRate__SWIG_3(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(arg1), Date.getCPtr(settlementDate), settlementDate);
  }

  public static double atmRate(Leg arg0, SWIGTYPE_p_YieldTermStructure arg1) {
    return QuantLibJNI.CashFlows_atmRate__SWIG_4(Leg.getCPtr(arg0), arg0, SWIGTYPE_p_YieldTermStructure.getCPtr(arg1));
  }

  public static double irr(Leg arg0, double marketPrice, DayCounter dayCounter, Compounding compounding, Frequency frequency, Date settlementDate, double tolerance, long maxIterations, double guess) {
    return QuantLibJNI.CashFlows_irr__SWIG_0(Leg.getCPtr(arg0), arg0, marketPrice, DayCounter.getCPtr(dayCounter), dayCounter, compounding.swigValue(), frequency.swigValue(), Date.getCPtr(settlementDate), settlementDate, tolerance, maxIterations, guess);
  }

  public static double irr(Leg arg0, double marketPrice, DayCounter dayCounter, Compounding compounding, Frequency frequency, Date settlementDate, double tolerance, long maxIterations) {
    return QuantLibJNI.CashFlows_irr__SWIG_1(Leg.getCPtr(arg0), arg0, marketPrice, DayCounter.getCPtr(dayCounter), dayCounter, compounding.swigValue(), frequency.swigValue(), Date.getCPtr(settlementDate), settlementDate, tolerance, maxIterations);
  }

  public static double irr(Leg arg0, double marketPrice, DayCounter dayCounter, Compounding compounding, Frequency frequency, Date settlementDate, double tolerance) {
    return QuantLibJNI.CashFlows_irr__SWIG_2(Leg.getCPtr(arg0), arg0, marketPrice, DayCounter.getCPtr(dayCounter), dayCounter, compounding.swigValue(), frequency.swigValue(), Date.getCPtr(settlementDate), settlementDate, tolerance);
  }

  public static double irr(Leg arg0, double marketPrice, DayCounter dayCounter, Compounding compounding, Frequency frequency, Date settlementDate) {
    return QuantLibJNI.CashFlows_irr__SWIG_3(Leg.getCPtr(arg0), arg0, marketPrice, DayCounter.getCPtr(dayCounter), dayCounter, compounding.swigValue(), frequency.swigValue(), Date.getCPtr(settlementDate), settlementDate);
  }

  public static double irr(Leg arg0, double marketPrice, DayCounter dayCounter, Compounding compounding, Frequency frequency) {
    return QuantLibJNI.CashFlows_irr__SWIG_4(Leg.getCPtr(arg0), arg0, marketPrice, DayCounter.getCPtr(dayCounter), dayCounter, compounding.swigValue(), frequency.swigValue());
  }

  public static double irr(Leg arg0, double marketPrice, DayCounter dayCounter, Compounding compounding) {
    return QuantLibJNI.CashFlows_irr__SWIG_5(Leg.getCPtr(arg0), arg0, marketPrice, DayCounter.getCPtr(dayCounter), dayCounter, compounding.swigValue());
  }

  public static double duration(Leg arg0, InterestRate arg1, Duration.Type type, Date settlementDate) {
    return QuantLibJNI.CashFlows_duration__SWIG_0(Leg.getCPtr(arg0), arg0, InterestRate.getCPtr(arg1), arg1, type.swigValue(), Date.getCPtr(settlementDate), settlementDate);
  }

  public static double duration(Leg arg0, InterestRate arg1, Duration.Type type) {
    return QuantLibJNI.CashFlows_duration__SWIG_1(Leg.getCPtr(arg0), arg0, InterestRate.getCPtr(arg1), arg1, type.swigValue());
  }

  public static double duration(Leg arg0, InterestRate arg1) {
    return QuantLibJNI.CashFlows_duration__SWIG_2(Leg.getCPtr(arg0), arg0, InterestRate.getCPtr(arg1), arg1);
  }

  public static double convexity(Leg arg0, InterestRate arg1, Date settlementDate) {
    return QuantLibJNI.CashFlows_convexity__SWIG_0(Leg.getCPtr(arg0), arg0, InterestRate.getCPtr(arg1), arg1, Date.getCPtr(settlementDate), settlementDate);
  }

  public static double convexity(Leg arg0, InterestRate arg1) {
    return QuantLibJNI.CashFlows_convexity__SWIG_1(Leg.getCPtr(arg0), arg0, InterestRate.getCPtr(arg1), arg1);
  }

}
