/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.9
 *
 * 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 LatLongCoordsIterator {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

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

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

  protected void finalize() {
    delete();
  }

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

  public LatLongCoordsIterator() {
    this(XapianJNI.new_LatLongCoordsIterator(), true);
  }

  public boolean equals(LatLongCoordsIterator o) {
    return XapianJNI.LatLongCoordsIterator_equals(swigCPtr, this, LatLongCoordsIterator.getCPtr(o), o);
  }

  public LatLongCoord getCoord() {
    return new LatLongCoord(XapianJNI.LatLongCoordsIterator_getCoord(swigCPtr, this), true);
  }

  public LatLongCoord next() {
    return new LatLongCoord(XapianJNI.LatLongCoordsIterator_next(swigCPtr, this), true);
  }

}
