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

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

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

  protected void finalize() {
    delete();
  }

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

  public IntervalPriceVector() {
    this(QuantLibJNI.new_IntervalPriceVector__SWIG_0(), true);
  }

  public IntervalPriceVector(long n) {
    this(QuantLibJNI.new_IntervalPriceVector__SWIG_1(n), true);
  }

  public long size() {
    return QuantLibJNI.IntervalPriceVector_size(swigCPtr, this);
  }

  public long capacity() {
    return QuantLibJNI.IntervalPriceVector_capacity(swigCPtr, this);
  }

  public void reserve(long n) {
    QuantLibJNI.IntervalPriceVector_reserve(swigCPtr, this, n);
  }

  public boolean isEmpty() {
    return QuantLibJNI.IntervalPriceVector_isEmpty(swigCPtr, this);
  }

  public void clear() {
    QuantLibJNI.IntervalPriceVector_clear(swigCPtr, this);
  }

  public void add(IntervalPrice x) {
    QuantLibJNI.IntervalPriceVector_add(swigCPtr, this, IntervalPrice.getCPtr(x), x);
  }

  public IntervalPrice get(int i) {
    return new IntervalPrice(QuantLibJNI.IntervalPriceVector_get(swigCPtr, this, i), false);
  }

  public void set(int i, IntervalPrice val) {
    QuantLibJNI.IntervalPriceVector_set(swigCPtr, this, i, IntervalPrice.getCPtr(val), val);
  }

}
