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 ListOfMemberConstraints extends ListOf {
012   private long swigCPtr;
013
014   protected ListOfMemberConstraints(long cPtr, boolean cMemoryOwn)
015   {
016     super(libsbmlJNI.ListOfMemberConstraints_SWIGUpcast(cPtr), cMemoryOwn);
017     swigCPtr = cPtr;
018   }
019
020   protected static long getCPtr(ListOfMemberConstraints obj)
021   {
022     return (obj == null) ? 0 : obj.swigCPtr;
023   }
024
025   protected static long getCPtrAndDisown (ListOfMemberConstraints obj)
026   {
027     long ptr = 0;
028
029     if (obj != null)
030     {
031       ptr             = obj.swigCPtr;
032       obj.swigCMemOwn = false;
033     }
034
035     return ptr;
036   }
037
038  protected void finalize() {
039    delete();
040  }
041
042  public synchronized void delete() {
043    if (swigCPtr != 0) {
044      if (swigCMemOwn) {
045        swigCMemOwn = false;
046        libsbmlJNI.delete_ListOfMemberConstraints(swigCPtr);
047      }
048      swigCPtr = 0;
049    }
050    super.delete();
051  }
052
053  
054/**
055   * Creates a new ListOfMemberConstraints with the given level, version, and package version.
056   <p>
057   * @param level a long integer, the SBML Level to assign to this ListOfMemberConstraints
058   <p>
059   * @param version a long integer, the SBML Version to assign to this ListOfMemberConstraints
060   <p>
061   * @param pkgVersion a long integer, the SBML Groups Version to assign to this ListOfMemberConstraints
062   */ public
063 ListOfMemberConstraints(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException {
064    this(libsbmlJNI.new_ListOfMemberConstraints__SWIG_0(level, version, pkgVersion), true);
065  }
066
067  
068/**
069   * Creates a new ListOfMemberConstraints with the given level, version, and package version.
070   <p>
071   * @param level a long integer, the SBML Level to assign to this ListOfMemberConstraints
072   <p>
073   * @param version a long integer, the SBML Version to assign to this ListOfMemberConstraints
074   <p>
075   * @param pkgVersion a long integer, the SBML Groups Version to assign to this ListOfMemberConstraints
076   */ public
077 ListOfMemberConstraints(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
078    this(libsbmlJNI.new_ListOfMemberConstraints__SWIG_1(level, version), true);
079  }
080
081  
082/**
083   * Creates a new ListOfMemberConstraints with the given level, version, and package version.
084   <p>
085   * @param level a long integer, the SBML Level to assign to this ListOfMemberConstraints
086   <p>
087   * @param version a long integer, the SBML Version to assign to this ListOfMemberConstraints
088   <p>
089   * @param pkgVersion a long integer, the SBML Groups Version to assign to this ListOfMemberConstraints
090   */ public
091 ListOfMemberConstraints(long level) throws org.sbml.libsbml.SBMLConstructorException {
092    this(libsbmlJNI.new_ListOfMemberConstraints__SWIG_2(level), true);
093  }
094
095  
096/**
097   * Creates a new ListOfMemberConstraints with the given level, version, and package version.
098   <p>
099   * @param level a long integer, the SBML Level to assign to this ListOfMemberConstraints
100   <p>
101   * @param version a long integer, the SBML Version to assign to this ListOfMemberConstraints
102   <p>
103   * @param pkgVersion a long integer, the SBML Groups Version to assign to this ListOfMemberConstraints
104   */ public
105 ListOfMemberConstraints() throws org.sbml.libsbml.SBMLConstructorException {
106    this(libsbmlJNI.new_ListOfMemberConstraints__SWIG_3(), true);
107  }
108
109  
110/**
111   * Creates a new ListOfMemberConstraints with the given GroupsPkgNamespaces object.
112   <p>
113   * @param groupsns the GroupsPkgNamespaces object
114   */ public
115 ListOfMemberConstraints(GroupsPkgNamespaces groupsns) throws org.sbml.libsbml.SBMLConstructorException {
116    this(libsbmlJNI.new_ListOfMemberConstraints__SWIG_4(GroupsPkgNamespaces.getCPtr(groupsns), groupsns), true);
117  }
118
119  
120/**
121   * Creates and returns a deep copy of this ListOfMemberConstraints object.
122   <p>
123   * @return a (deep) copy of this ListOfMemberConstraints object.
124   */ public
125 ListOfMemberConstraints cloneObject() {
126    long cPtr = libsbmlJNI.ListOfMemberConstraints_cloneObject(swigCPtr, this);
127    return (cPtr == 0) ? null : new ListOfMemberConstraints(cPtr, true);
128  }
129
130  
131/**
132   * Get a MemberConstraint from the ListOfMemberConstraints.
133   <p>
134   * @param n the index number of the MemberConstraint to get.
135   <p>
136   * @return the nth MemberConstraint in this ListOfMemberConstraints.
137   <p>
138   * @see #size()
139   */ public
140 MemberConstraint get(long n) {
141    long cPtr = libsbmlJNI.ListOfMemberConstraints_get__SWIG_0(swigCPtr, this, n);
142    return (cPtr == 0) ? null : new MemberConstraint(cPtr, false);
143  }
144
145  
146/**
147   * Get a MemberConstraint from the ListOfMemberConstraints
148   * based on its identifier.
149   <p>
150   * @param sid a string representing the identifier
151   * of the MemberConstraint to get.
152   <p>
153   * @return MemberConstraint in this ListOfMemberConstraints
154   * with the given id or null if no such
155   * MemberConstraint exists.
156   <p>
157   * @see #get(long n)   *
158   * @see #size()
159   */ public
160 MemberConstraint get(String sid) {
161    long cPtr = libsbmlJNI.ListOfMemberConstraints_get__SWIG_2(swigCPtr, this, sid);
162    return (cPtr == 0) ? null : new MemberConstraint(cPtr, false);
163  }
164
165  
166/**
167   * Removes the nth MemberConstraint from this ListOfMemberConstraints
168   * and returns a pointer to it.
169   <p>
170   * The caller owns the returned item and is responsible for deleting it.
171   <p>
172   * @param n the index of the MemberConstraint to remove.
173   <p>
174   * @see #size()
175   */ public
176 MemberConstraint remove(long n) {
177    long cPtr = libsbmlJNI.ListOfMemberConstraints_remove__SWIG_0(swigCPtr, this, n);
178    return (cPtr == 0) ? null : new MemberConstraint(cPtr, true);
179  }
180
181  
182/**
183   * Removes the MemberConstraint from this ListOfMemberConstraints with the given identifier
184   * and returns a pointer to it.
185   <p>
186   * The caller owns the returned item and is responsible for deleting it.
187   * If none of the items in this list have the identifier <code>sid</code>, then
188   * <code>null</code> is returned.
189   <p>
190   * @param sid the identifier of the MemberConstraint to remove.
191   <p>
192   * @return the MemberConstraint removed. As mentioned above, the caller owns the
193   * returned item.
194   */ public
195 MemberConstraint remove(String sid) {
196    long cPtr = libsbmlJNI.ListOfMemberConstraints_remove__SWIG_1(swigCPtr, this, sid);
197    return (cPtr == 0) ? null : new MemberConstraint(cPtr, true);
198  }
199
200  
201/**
202   * Returns the value of the 'id' attribute of this ListOfMemberConstraints.
203   <p>
204   * @return the value of the 'id' attribute of this ListOfMemberConstraints as a string.
205   */ public
206 String getId() {
207    return libsbmlJNI.ListOfMemberConstraints_getId(swigCPtr, this);
208  }
209
210  
211/**
212   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
213   * ListOfMemberConstraints' 'id' attribute has been set.
214   <p>
215   * @return <code>true</code> if this ListOfMemberConstraints' 'id' attribute has been set,
216   * otherwise <code>false</code> is returned.
217   */ public
218 boolean isSetId() {
219    return libsbmlJNI.ListOfMemberConstraints_isSetId(swigCPtr, this);
220  }
221
222  
223/**
224   * Sets the value of the 'id' attribute of this ListOfMemberConstraints.
225   <p>
226   * @param id; String value of the 'id' attribute to be set
227   <p>
228   * @return integer value indicating success/failure of the
229   * function.   The possible values
230   * returned by this function are:
231   * <ul>
232   * <li> LIBSBML_OPERATION_SUCCESS
233   * <li> LIBSBML_INVALID_ATTRIBUTE_VALUE
234   * </ul>
235   */ public
236 int setId(String id) {
237    return libsbmlJNI.ListOfMemberConstraints_setId(swigCPtr, this, id);
238  }
239
240  
241/**
242   * Unsets the value of the 'id' attribute of this ListOfMemberConstraints.
243   <p>
244   * @return integer value indicating success/failure of the
245   * function.   The possible values
246   * returned by this function are:
247   * <ul>
248   * <li> LIBSBML_OPERATION_SUCCESS
249   * <li> LIBSBML_OPERATION_FAILED
250   * </ul>
251   */ public
252 int unsetId() {
253    return libsbmlJNI.ListOfMemberConstraints_unsetId(swigCPtr, this);
254  }
255
256  
257/**
258   * Returns the value of the 'name' attribute of this ListOfMemberConstraints.
259   <p>
260   * @return the value of the 'name' attribute of this ListOfMemberConstraints as a string.
261   */ public
262 String getName() {
263    return libsbmlJNI.ListOfMemberConstraints_getName(swigCPtr, this);
264  }
265
266  
267/**
268   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
269   * ListOfMemberConstraints' 'name' attribute has been set.
270   <p>
271   * @return <code>true</code> if this ListOfMemberConstraints' 'name' attribute has been set,
272   * otherwise <code>false</code> is returned.
273   */ public
274 boolean isSetName() {
275    return libsbmlJNI.ListOfMemberConstraints_isSetName(swigCPtr, this);
276  }
277
278  
279/**
280   * Sets the value of the 'name' attribute of this ListOfMemberConstraints.
281   <p>
282   * @param name; String value of the 'name' attribute to be set
283   <p>
284   * @return integer value indicating success/failure of the
285   * function.   The possible values
286   * returned by this function are:
287   * <ul>
288   * <li> LIBSBML_OPERATION_SUCCESS
289   * <li> LIBSBML_INVALID_ATTRIBUTE_VALUE
290   * </ul>
291   */ public
292 int setName(String name) {
293    return libsbmlJNI.ListOfMemberConstraints_setName(swigCPtr, this, name);
294  }
295
296  
297/**
298   * Unsets the value of the 'name' attribute of this ListOfMemberConstraints.
299   <p>
300   * @return integer value indicating success/failure of the
301   * function.   The possible values
302   * returned by this function are:
303   * <ul>
304   * <li> LIBSBML_OPERATION_SUCCESS
305   * <li> LIBSBML_OPERATION_FAILED
306   * </ul>
307   */ public
308 int unsetName() {
309    return libsbmlJNI.ListOfMemberConstraints_unsetName(swigCPtr, this);
310  }
311
312  
313/**
314   * Returns the value of the 'membersShareType' attribute of this ListOfMemberConstraints.
315   <p>
316   * @return the value of the 'membersShareType' attribute of this ListOfMemberConstraints as a string.
317   */ public
318 boolean getMembersShareType() {
319    return libsbmlJNI.ListOfMemberConstraints_getMembersShareType(swigCPtr, this);
320  }
321
322  
323/**
324   * Predicate returning <code>true</code> or <code>false</code> depending on whether this
325   * ListOfMemberConstraints's 'membersShareType' attribute has been set.
326   <p>
327   * @return <code>true</code> if this ListOfMemberConstraints's 'membersShareType' attribute has been set,
328   * otherwise <code>false</code> is returned.
329   */ public
330 boolean isSetMembersShareType() {
331    return libsbmlJNI.ListOfMemberConstraints_isSetMembersShareType(swigCPtr, this);
332  }
333
334  
335/**
336   * Sets the value of the 'membersShareType' attribute of this ListOfMemberConstraints.
337   <p>
338   * @param membersShareType; String value of the 'membersShareType' attribute to be set
339   <p>
340   * @return integer value indicating success/failure of the
341   * function.   The possible values
342   * returned by this function are:
343   * <ul>
344   * <li> LIBSBML_OPERATION_SUCCESS
345   * <li> LIBSBML_INVALID_ATTRIBUTE_VALUE
346   * </ul>
347   */ public
348 int setMembersShareType(boolean membersShareType) {
349    return libsbmlJNI.ListOfMemberConstraints_setMembersShareType(swigCPtr, this, membersShareType);
350  }
351
352  
353/**
354   * Unsets the value of the 'membersShareType' attribute of this ListOfMemberConstraints.
355   <p>
356   * @return integer value indicating success/failure of the
357   * function.   The possible values
358   * returned by this function are:
359   * <ul>
360   * <li> LIBSBML_OPERATION_SUCCESS
361   * <li> LIBSBML_OPERATION_FAILED
362   * </ul>
363   */ public
364 int unsetMembersShareType() {
365    return libsbmlJNI.ListOfMemberConstraints_unsetMembersShareType(swigCPtr, this);
366  }
367
368  
369/**
370   * Returns the XML element name of this object, which for ListOfMemberConstraints, is
371   * always <code>'listOfMemberConstraints'.</code>
372   <p>
373   * @return the name of this element, i.e. <code>'listOfMemberConstraints'.</code>
374   */ public
375 String getElementName() {
376    return libsbmlJNI.ListOfMemberConstraints_getElementName(swigCPtr, this);
377  }
378
379  
380/**
381   * Returns the libSBML type code for this SBML object.
382   <p>
383   * LibSBML attaches an identifying code to every
384   * kind of SBML object.  These are known as <em>SBML type codes</em>.  In
385   * other languages, the set of type codes is stored in an enumeration; in
386   * the Java language interface for libSBML, the type codes are defined as
387   * static integer constants in the interface class {@link
388   * libsbmlConstants}.  The names of the type codes all begin with the
389   * characters <code>SBML_.</code> 
390   <p>
391   * @return the SBML type code for this object, or
392   * {@link  libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN} (default).
393   <p>
394   * @see #getElementName()
395   */ public
396 int getTypeCode() {
397    return libsbmlJNI.ListOfMemberConstraints_getTypeCode(swigCPtr, this);
398  }
399
400  
401/**
402   * Returns the libSBML type code for the SBML objects
403   * contained in this {@link ListOf} object
404   <p>
405   * LibSBML attaches an identifying code to every
406   * kind of SBML object.  These are known as <em>SBML type codes</em>.  In
407   * other languages, the set of type codes is stored in an enumeration; in
408   * the Java language interface for libSBML, the type codes are defined as
409   * static integer constants in the interface class {@link
410   * libsbmlConstants}.  The names of the type codes all begin with the
411   * characters <code>SBML_.</code> 
412   <p>
413   * @return the SBML type code for the objects in this {@link ListOf} instance, or
414   * {@link  libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN} (default).
415   <p>
416   * @see #getElementName()
417   */ public
418 int getItemTypeCode() {
419    return libsbmlJNI.ListOfMemberConstraints_getItemTypeCode(swigCPtr, this);
420  }
421
422}