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

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

  protected static long getCPtr(ParameterRange 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_ParameterRange(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public void setName(String value) {
    swigfaissJNI.ParameterRange_name_set(swigCPtr, this, value);
  }

  public String getName() {
    return swigfaissJNI.ParameterRange_name_get(swigCPtr, this);
  }

  public void setValues(DoubleVector value) {
    swigfaissJNI.ParameterRange_values_set(swigCPtr, this, DoubleVector.getCPtr(value), value);
  }

  public DoubleVector getValues() {
    long cPtr = swigfaissJNI.ParameterRange_values_get(swigCPtr, this);
    return (cPtr == 0) ? null : new DoubleVector(cPtr, false);
  }

  public ParameterRange() {
    this(swigfaissJNI.new_ParameterRange(), true);
  }

}
