/* ----------------------------------------------------------------------------
 * 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 PairDoubleVector {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

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

  protected static long getCPtr(PairDoubleVector 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_PairDoubleVector(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public PairDoubleVector() {
    this(QuantLibJNI.new_PairDoubleVector__SWIG_0(), true);
  }

  public PairDoubleVector(DoubleVector first, DoubleVector second) {
    this(QuantLibJNI.new_PairDoubleVector__SWIG_1(DoubleVector.getCPtr(first), first, DoubleVector.getCPtr(second), second), true);
  }

  public PairDoubleVector(PairDoubleVector other) {
    this(QuantLibJNI.new_PairDoubleVector__SWIG_2(PairDoubleVector.getCPtr(other), other), true);
  }

  public void setFirst(DoubleVector value) {
    QuantLibJNI.PairDoubleVector_first_set(swigCPtr, this, DoubleVector.getCPtr(value), value);
  }

  public DoubleVector getFirst() {
    long cPtr = QuantLibJNI.PairDoubleVector_first_get(swigCPtr, this);
    return (cPtr == 0) ? null : new DoubleVector(cPtr, false);
  }

  public void setSecond(DoubleVector value) {
    QuantLibJNI.PairDoubleVector_second_set(swigCPtr, this, DoubleVector.getCPtr(value), value);
  }

  public DoubleVector getSecond() {
    long cPtr = QuantLibJNI.PairDoubleVector_second_get(swigCPtr, this);
    return (cPtr == 0) ? null : new DoubleVector(cPtr, false);
  }

}
