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

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

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

  protected void finalize() {
    delete();
  }

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

  public BoolVector() {
    this(QuantLibJNI.new_BoolVector__SWIG_0(), true);
  }

  public BoolVector(long n) {
    this(QuantLibJNI.new_BoolVector__SWIG_1(n), true);
  }

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

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

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

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

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

  public void add(boolean x) {
    QuantLibJNI.BoolVector_add(swigCPtr, this, x);
  }

  public boolean get(int i) {
    return QuantLibJNI.BoolVector_get(swigCPtr, this, i);
  }

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

}
