001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (http://www.swig.org).
003 * Version 2.0.12
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 StringSet {
012   private long swigCPtr;
013   protected boolean swigCMemOwn;
014
015   protected StringSet(long cPtr, boolean cMemoryOwn)
016   {
017     swigCMemOwn = cMemoryOwn;
018     swigCPtr    = cPtr;
019   }
020
021   protected static long getCPtr(StringSet obj)
022   {
023     return (obj == null) ? 0 : obj.swigCPtr;
024   }
025
026   protected static long getCPtrAndDisown (StringSet obj)
027   {
028     long ptr = 0;
029
030     if (obj != null)
031     {
032       ptr             = obj.swigCPtr;
033       obj.swigCMemOwn = false;
034     }
035
036     return ptr;
037   }
038
039  protected void finalize() {
040    delete();
041  }
042
043  public synchronized void delete() {
044    if (swigCPtr != 0) {
045      if (swigCMemOwn) {
046        swigCMemOwn = false;
047        libsbmlJNI.delete_StringSet(swigCPtr);
048      }
049      swigCPtr = 0;
050    }
051  }
052
053  public StringSet() {
054    this(libsbmlJNI.new_StringSet__SWIG_0(), true);
055  }
056
057  public StringSet(StringSet arg0) {
058    this(libsbmlJNI.new_StringSet__SWIG_1(StringSet.getCPtr(arg0), arg0), true);
059  }
060
061  public long size() {
062    return libsbmlJNI.StringSet_size(swigCPtr, this);
063  }
064
065  public boolean empty() {
066    return libsbmlJNI.StringSet_empty(swigCPtr, this);
067  }
068
069  public void clear() {
070    libsbmlJNI.StringSet_clear(swigCPtr, this);
071  }
072
073  public String get(String key) {
074    return libsbmlJNI.StringSet_get(swigCPtr, this, key);
075  }
076
077  public void insert(String key) {
078    libsbmlJNI.StringSet_insert(swigCPtr, this, key);
079  }
080
081  public void del(String key) {
082    libsbmlJNI.StringSet_del(swigCPtr, this, key);
083  }
084
085  public boolean has_key(String key) {
086    return libsbmlJNI.StringSet_has_key(swigCPtr, this, key);
087  }
088
089}