/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.31 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ package hep.aida.swig; import hep.aida.jni.AIDAJNIUtil; public class IRangeSet implements hep.aida.IRangeSet { private long swigCPtr; protected boolean swigCMemOwn; public IRangeSet(long cPtr, boolean cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = cPtr; } protected static long getCPtr(hep.aida.IRangeSet obj) { if (obj instanceof IRangeSet) { return (obj == null) ? 0 : ((IRangeSet)obj).swigCPtr; } else { long cPtr = AIDAJNI.new_IRangeSet(); // FIXME, memory leak if Java class gets finalized, since C++ director is not freed. AIDAJNI.IRangeSet_director_connect(obj, cPtr, true, true); return cPtr; } } protected void finalize() { delete(); } public synchronized void delete() { if(swigCPtr != 0 && swigCMemOwn) { swigCMemOwn = false; AIDAJNI.delete_IRangeSet(swigCPtr); } swigCPtr = 0; } protected void swigDirectorDisconnect() { swigCMemOwn = false; delete(); } public void swigReleaseOwnership() { swigCMemOwn = false; AIDAJNI.IRangeSet_change_ownership(this, swigCPtr, false); } public void swigTakeOwnership() { swigCMemOwn = true; AIDAJNI.IRangeSet_change_ownership(this, swigCPtr, true); } public double[] lowerBounds() { return AIDAJNI.IRangeSet_lowerBounds(swigCPtr, this); } public double[] upperBounds() { return AIDAJNI.IRangeSet_upperBounds(swigCPtr, this); } public void include(double xMin, double xMax) { AIDAJNI.IRangeSet_include(swigCPtr, this, xMin, xMax); } public void exclude(double xMin, double xMax) { AIDAJNI.IRangeSet_exclude(swigCPtr, this, xMin, xMax); } public void includeAll() { AIDAJNI.IRangeSet_includeAll(swigCPtr, this); } public void excludeAll() { AIDAJNI.IRangeSet_excludeAll(swigCPtr, this); } public boolean isInRange(double point) { return AIDAJNI.IRangeSet_isInRange(swigCPtr, this, point); } public int size() { return AIDAJNI.IRangeSet_size(swigCPtr, this); } public double PLUS_INF() { return AIDAJNI.IRangeSet_PLUS_INF(swigCPtr, this); } public double MINUS_INF() { return AIDAJNI.IRangeSet_MINUS_INF(swigCPtr, this); } public IRangeSet() { this(AIDAJNI.new_IRangeSet(), true); AIDAJNI.IRangeSet_director_connect(this, swigCPtr, swigCMemOwn, true); } }