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

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

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

  @SuppressWarnings("deprecation")
  protected void finalize() {
    delete();
  }

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

  public DoublePair() {
    this(QuantLibJNI.new_DoublePair__SWIG_0(), true);
  }

  public DoublePair(double first, double second) {
    this(QuantLibJNI.new_DoublePair__SWIG_1(first, second), true);
  }

  public DoublePair(DoublePair other) {
    this(QuantLibJNI.new_DoublePair__SWIG_2(DoublePair.getCPtr(other), other), true);
  }

  public void setFirst(double value) {
    QuantLibJNI.DoublePair_first_set(swigCPtr, this, value);
  }

  public double getFirst() {
    return QuantLibJNI.DoublePair_first_get(swigCPtr, this);
  }

  public void setSecond(double value) {
    QuantLibJNI.DoublePair_second_set(swigCPtr, this, value);
  }

  public double getSecond() {
    return QuantLibJNI.DoublePair_second_get(swigCPtr, this);
  }

}
