/* ----------------------------------------------------------------------------
 * 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 DownRounding extends Rounding {
  private long swigCPtr;

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

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

  protected void finalize() {
    delete();
  }

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

  public DownRounding(int precision, int digit) {
    this(QuantLibJNI.new_DownRounding__SWIG_0(precision, digit), true);
  }

  public DownRounding(int precision) {
    this(QuantLibJNI.new_DownRounding__SWIG_1(precision), true);
  }

}
