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

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

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

  protected void finalize() {
    delete();
  }

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

  public IntVector() {
    this(QuantLibJNI.new_IntVector__SWIG_0(), true);
  }

  public IntVector(long n) {
    this(QuantLibJNI.new_IntVector__SWIG_1(n), true);
  }

  public long size() {
    return QuantLibJNI.IntVector_size(swigCPtr);
  }

  public long capacity() {
    return QuantLibJNI.IntVector_capacity(swigCPtr);
  }

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

  public boolean isEmpty() {
    return QuantLibJNI.IntVector_isEmpty(swigCPtr);
  }

  public void clear() {
    QuantLibJNI.IntVector_clear(swigCPtr);
  }

  public void add(int x) {
    QuantLibJNI.IntVector_add(swigCPtr, x);
  }

  public int get(int i) {
    return QuantLibJNI.IntVector_get(swigCPtr, i);
  }

  public void set(int i, int x) {
    QuantLibJNI.IntVector_set(swigCPtr, i, x);
  }

}
