/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.29
 *
 * 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 USDLibor extends Xibor {
  private long swigCPtr;

  protected USDLibor(long cPtr, boolean cMemoryOwn) {
    super(QuantLibJNI.SWIGUSDLiborUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

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

  protected void finalize() {
    delete();
  }

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

  public USDLibor(int n, TimeUnit units, YieldTermStructureHandle h, DayCounter dayCount) {
    this(QuantLibJNI.new_USDLibor__SWIG_0(n, units.swigValue(), YieldTermStructureHandle.getCPtr(h), DayCounter.getCPtr(dayCount)), true);
  }

  public USDLibor(int n, TimeUnit units, YieldTermStructureHandle h) {
    this(QuantLibJNI.new_USDLibor__SWIG_1(n, units.swigValue(), YieldTermStructureHandle.getCPtr(h)), true);
  }

}
