1 /* ---------------------------------------------------------------------------- 2 * This file was automatically generated by SWIG (http://www.swig.org). 3 * Version 3.0.13 4 * 5 * Do not make changes to this file unless you know what you are doing--modify 6 * the SWIG interface file instead. 7 * ----------------------------------------------------------------------------- */ 8 9 package org.xapian; 10 11 public class LatLongMetric { 12 private transient long swigCPtr; 13 protected transient boolean swigCMemOwn; 14 LatLongMetric(long cPtr, boolean cMemoryOwn)15 protected LatLongMetric(long cPtr, boolean cMemoryOwn) { 16 swigCMemOwn = cMemoryOwn; 17 swigCPtr = cPtr; 18 } 19 getCPtr(LatLongMetric obj)20 protected static long getCPtr(LatLongMetric obj) { 21 return (obj == null) ? 0 : obj.swigCPtr; 22 } 23 finalize()24 protected void finalize() { 25 delete(); 26 } 27 delete()28 public synchronized void delete() { 29 if (swigCPtr != 0) { 30 if (swigCMemOwn) { 31 swigCMemOwn = false; 32 XapianJNI.delete_LatLongMetric(swigCPtr); 33 } 34 swigCPtr = 0; 35 } 36 } 37 swigDirectorDisconnect()38 protected void swigDirectorDisconnect() { 39 swigCMemOwn = false; 40 delete(); 41 } 42 swigReleaseOwnership()43 public void swigReleaseOwnership() { 44 swigCMemOwn = false; 45 XapianJNI.LatLongMetric_change_ownership(this, swigCPtr, false); 46 } 47 swigTakeOwnership()48 public void swigTakeOwnership() { 49 swigCMemOwn = true; 50 XapianJNI.LatLongMetric_change_ownership(this, swigCPtr, true); 51 } 52 pointwiseDistance(LatLongCoord a, LatLongCoord b)53 public double pointwiseDistance(LatLongCoord a, LatLongCoord b) { 54 return XapianJNI.LatLongMetric_pointwiseDistance(swigCPtr, this, LatLongCoord.getCPtr(a), a, LatLongCoord.getCPtr(b), b); 55 } 56 apply(LatLongCoords a, LatLongCoords b)57 public double apply(LatLongCoords a, LatLongCoords b) { 58 return XapianJNI.LatLongMetric_apply__SWIG_0(swigCPtr, this, LatLongCoords.getCPtr(a), a, LatLongCoords.getCPtr(b), b); 59 } 60 apply(LatLongCoords a, String b)61 public double apply(LatLongCoords a, String b) { 62 return XapianJNI.LatLongMetric_apply__SWIG_1(swigCPtr, this, LatLongCoords.getCPtr(a), a, b); 63 } 64 apply(LatLongCoords a, String b_ptr, long b_len)65 public double apply(LatLongCoords a, String b_ptr, long b_len) { 66 return XapianJNI.LatLongMetric_apply__SWIG_2(swigCPtr, this, LatLongCoords.getCPtr(a), a, b_ptr, b_len); 67 } 68 name()69 public String name() { 70 return XapianJNI.LatLongMetric_name(swigCPtr, this); 71 } 72 LatLongMetric()73 public LatLongMetric() { 74 this(XapianJNI.new_LatLongMetric(), true); 75 XapianJNI.LatLongMetric_director_connect(this, swigCPtr, swigCMemOwn, true); 76 } 77 78 } 79