001/* ---------------------------------------------------------------------------- 002 * This file was automatically generated by SWIG (http://www.swig.org). 003 * Version 2.0.11 004 * 005 * Do not make changes to this file unless you know what you are doing--modify 006 * the SWIG interface file instead. 007 * ----------------------------------------------------------------------------- */ 008 009package org.sbml.libsbml; 010 011public class CVTermList { 012 private long swigCPtr; 013 protected boolean swigCMemOwn; 014 015 protected CVTermList(long cPtr, boolean cMemoryOwn) { 016 swigCMemOwn = cMemoryOwn; 017 swigCPtr = cPtr; 018 } 019 020 protected static long getCPtr(CVTermList obj) { 021 return (obj == null) ? 0 : obj.swigCPtr; 022 } 023 024 protected void finalize() { 025 delete(); 026 } 027 028 public synchronized void delete() { 029 if (swigCPtr != 0) { 030 if (swigCMemOwn) { 031 swigCMemOwn = false; 032 libsbmlJNI.delete_CVTermList(swigCPtr); 033 } 034 swigCPtr = 0; 035 } 036 } 037 038 public CVTermList() { 039 this(libsbmlJNI.new_CVTermList(), true); 040 } 041 042 public void add(CVTerm item) { 043 libsbmlJNI.CVTermList_add(swigCPtr, this, CVTerm.getCPtr(item), item); 044 } 045 046 public CVTerm get(long n) { 047 long cPtr = libsbmlJNI.CVTermList_get(swigCPtr, this, n); 048 return (cPtr == 0) ? null : new CVTerm(cPtr, false); 049 } 050 051 public void prepend(CVTerm item) { 052 libsbmlJNI.CVTermList_prepend(swigCPtr, this, CVTerm.getCPtr(item), item); 053 } 054 055 public CVTerm remove(long n) { 056 long cPtr = libsbmlJNI.CVTermList_remove(swigCPtr, this, n); 057 return (cPtr == 0) ? null : new CVTerm(cPtr, false); 058 } 059 060 public long getSize() { 061 return libsbmlJNI.CVTermList_getSize(swigCPtr, this); 062 } 063 064}