/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 2.0.5
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package org.xapian;

public class ESetIterator {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public ESetIterator(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

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

  protected void finalize() {
    delete();
  }

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

  public ESetIterator() {
    this(XapianJNI.new_ESetIterator__SWIG_0(), true);
  }

  public ESetIterator(ESetIterator other) {
    this(XapianJNI.new_ESetIterator__SWIG_1(ESetIterator.getCPtr(other), other), true);
  }

  public String getTerm() {
    return XapianJNI.ESetIterator_getTerm(swigCPtr, this);
  }

  public String next() {
    return XapianJNI.ESetIterator_next(swigCPtr, this);
  }

  public String prev() {
    return XapianJNI.ESetIterator_prev(swigCPtr, this);
  }

  public boolean equals(ESetIterator other) {
    return XapianJNI.ESetIterator_equals(swigCPtr, this, ESetIterator.getCPtr(other), other);
  }

  public double getWeight() {
    return XapianJNI.ESetIterator_getWeight(swigCPtr, this);
  }

  public String toString() {
    return XapianJNI.ESetIterator_toString(swigCPtr, this);
  }

}
