/* ----------------------------------------------------------------------------
 * 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 com.twitter.ann.faiss;

public class OnDiskOneList {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

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

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

  @SuppressWarnings("deprecation")
  protected void finalize() {
    delete();
  }

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

  public void setSize(long value) {
    swigfaissJNI.OnDiskOneList_size_set(swigCPtr, this, value);
  }

  public long getSize() {
    return swigfaissJNI.OnDiskOneList_size_get(swigCPtr, this);
  }

  public void setCapacity(long value) {
    swigfaissJNI.OnDiskOneList_capacity_set(swigCPtr, this, value);
  }

  public long getCapacity() {
    return swigfaissJNI.OnDiskOneList_capacity_get(swigCPtr, this);
  }

  public void setOffset(long value) {
    swigfaissJNI.OnDiskOneList_offset_set(swigCPtr, this, value);
  }

  public long getOffset() {
    return swigfaissJNI.OnDiskOneList_offset_get(swigCPtr, this);
  }

  public OnDiskOneList() {
    this(swigfaissJNI.new_OnDiskOneList(), true);
  }

}
