/* ----------------------------------------------------------------------------
* 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 IAnnotation implements hep.aida.IAnnotation {
private long swigCPtr;
protected boolean swigCMemOwn;
public IAnnotation(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(hep.aida.IAnnotation obj) {
if (obj instanceof IAnnotation) {
return (obj == null) ? 0 : ((IAnnotation)obj).swigCPtr;
} else {
long cPtr = AIDAJNI.new_IAnnotation();
// FIXME, memory leak if Java class gets finalized, since C++ director is not freed.
AIDAJNI.IAnnotation_director_connect(obj, cPtr, true, true);
return cPtr;
}
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if(swigCPtr != 0 && swigCMemOwn) {
swigCMemOwn = false;
AIDAJNI.delete_IAnnotation(swigCPtr);
}
swigCPtr = 0;
}
protected void swigDirectorDisconnect() {
swigCMemOwn = false;
delete();
}
public void swigReleaseOwnership() {
swigCMemOwn = false;
AIDAJNI.IAnnotation_change_ownership(this, swigCPtr, false);
}
public void swigTakeOwnership() {
swigCMemOwn = true;
AIDAJNI.IAnnotation_change_ownership(this, swigCPtr, true);
}
public void addItem(String key, String value, boolean sticky) {
AIDAJNI.IAnnotation_addItem__SWIG_0(swigCPtr, this, key, value, sticky);
}
public void addItem(String key, String value) {
AIDAJNI.IAnnotation_addItem__SWIG_1(swigCPtr, this, key, value);
}
public void removeItem(String key) {
AIDAJNI.IAnnotation_removeItem(swigCPtr, this, key);
}
public String value(String key) {
return AIDAJNI.IAnnotation_value__SWIG_0(swigCPtr, this, key);
}
public void setValue(String key, String value) {
AIDAJNI.IAnnotation_setValue(swigCPtr, this, key, value);
}
public void setSticky(String key, boolean sticky) {
AIDAJNI.IAnnotation_setSticky(swigCPtr, this, key, sticky);
}
public int size() {
return AIDAJNI.IAnnotation_size(swigCPtr, this);
}
public String key(int index) {
return AIDAJNI.IAnnotation_key(swigCPtr, this, index);
}
public String value(int index) {
return AIDAJNI.IAnnotation_value__SWIG_1(swigCPtr, this, index);
}
public void reset() {
AIDAJNI.IAnnotation_reset(swigCPtr, this);
}
public IAnnotation() {
this(AIDAJNI.new_IAnnotation(), true);
AIDAJNI.IAnnotation_director_connect(this, swigCPtr, swigCMemOwn, true);
}
}