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

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

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

  protected void finalize() {
    delete();
  }

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

  public StrVector() {
    this(QuantLibJNI.new_StrVector__SWIG_0(), true);
  }

  public StrVector(long n) {
    this(QuantLibJNI.new_StrVector__SWIG_1(n), true);
  }

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

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

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

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

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

  public void add(String x) {
    QuantLibJNI.StrVector_add(swigCPtr, this, x);
  }

  public String get(int i) {
    return QuantLibJNI.StrVector_get(swigCPtr, this, i);
  }

  public void set(int i, String val) {
    QuantLibJNI.StrVector_set(swigCPtr, this, i, val);
  }

}
