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

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

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

  public void setNbits(int value) {
    swigfaissJNI.IDSelectorBatch_nbits_set(swigCPtr, this, value);
  }

  public int getNbits() {
    return swigfaissJNI.IDSelectorBatch_nbits_get(swigCPtr, this);
  }

  public void setMask(long value) {
    swigfaissJNI.IDSelectorBatch_mask_set(swigCPtr, this, value);
  }

  public long getMask() {
    return swigfaissJNI.IDSelectorBatch_mask_get(swigCPtr, this);
}

  public IDSelectorBatch(long n, LongVector indices) {
    this(swigfaissJNI.new_IDSelectorBatch(n, SWIGTYPE_p_long_long.getCPtr(indices.data()), indices), true);
  }

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

}
