/* ----------------------------------------------------------------------------
 * 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 IDSelectorRange extends IDSelector {
  private transient long swigCPtr;

  protected IDSelectorRange(long cPtr, boolean cMemoryOwn) {
    super(swigfaissJNI.IDSelectorRange_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  protected static long getCPtr(IDSelectorRange 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_IDSelectorRange(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public void setImin(long value) {
    swigfaissJNI.IDSelectorRange_imin_set(swigCPtr, this, value);
  }

  public long getImin() {
    return swigfaissJNI.IDSelectorRange_imin_get(swigCPtr, this);
}

  public void setImax(long value) {
    swigfaissJNI.IDSelectorRange_imax_set(swigCPtr, this, value);
  }

  public long getImax() {
    return swigfaissJNI.IDSelectorRange_imax_get(swigCPtr, this);
}

  public IDSelectorRange(long imin, long imax) {
    this(swigfaissJNI.new_IDSelectorRange(imin, imax), true);
  }

  public boolean is_member(long id) {
    return swigfaissJNI.IDSelectorRange_is_member(swigCPtr, this, id);
  }

}
