001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (http://www.swig.org).
003 * Version 3.0.10
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
011/** 
012 *  Parent class for libSBML's 'ListOfXYZ' classes.
013 <p>
014 * <p style='color: #777; font-style: italic'>
015This class of objects is defined by libSBML only and has no direct
016equivalent in terms of SBML components.  This class is not prescribed by
017the SBML specifications, although it is used to implement features
018defined in SBML.
019</p>
020
021 <p>
022 * The {@link ListOf} class in libSBML is a utility class that serves as the parent
023 * class for implementing the ListOf__ classes.  It provides methods for
024 * working generically with the various SBML lists of objects in a program.
025 * LibSBML uses this separate list class rather than ordinary
026 * Java lists,
027 * so that it can provide the methods and features associated with {@link SBase}.
028 <p>
029 * <p>
030 * The various ListOf___ classes in SBML
031 * are merely containers used for organizing the main components of an SBML
032 * model.  In libSBML's implementation, ListOf___
033 * classes are derived from the
034 * intermediate utility class {@link ListOf}, which
035 * is not defined by the SBML specifications but serves as a useful
036 * programmatic construct.  {@link ListOf} is itself is in turn derived from {@link SBase},
037 * which provides all of the various ListOf___
038 * classes with common features
039 * defined by the SBML specification, such as 'metaid' attributes and
040 * annotations.
041 <p>
042 * Readers may wonder about the motivations for using the ListOf___
043 * containers in SBML.  A simpler approach in XML might be to place the
044 * components all directly at the top level of the model definition.  The
045 * choice made in SBML is to group them within XML elements named after
046 * ListOf<em>Classname</em>, in part because it helps organize the
047 * components.  More importantly, the fact that the container classes are
048 * derived from {@link SBase} means that software tools can add information <em>about</em>
049 * the lists themselves into each list container's 'annotation'.
050 <p>
051 * @see ListOfFunctionDefinitions
052 * @see ListOfUnitDefinitions
053 * @see ListOfCompartmentTypes
054 * @see ListOfSpeciesTypes
055 * @see ListOfCompartments
056 * @see ListOfSpecies
057 * @see ListOfParameters
058 * @see ListOfInitialAssignments
059 * @see ListOfRules
060 * @see ListOfConstraints
061 * @see ListOfReactions
062 * @see ListOfEvents
063 */
064
065public class ListOf extends SBase {
066   private long swigCPtr;
067
068   protected ListOf(long cPtr, boolean cMemoryOwn)
069   {
070     super(libsbmlJNI.ListOf_SWIGUpcast(cPtr), cMemoryOwn);
071     swigCPtr = cPtr;
072   }
073
074   protected static long getCPtr(ListOf obj)
075   {
076     return (obj == null) ? 0 : obj.swigCPtr;
077   }
078
079   protected static long getCPtrAndDisown (ListOf obj)
080   {
081     long ptr = 0;
082
083     if (obj != null)
084     {
085       ptr             = obj.swigCPtr;
086       obj.swigCMemOwn = false;
087     }
088
089     return ptr;
090   }
091
092  protected void finalize() {
093    delete();
094  }
095
096  public synchronized void delete() {
097    if (swigCPtr != 0) {
098      if (swigCMemOwn) {
099        swigCMemOwn = false;
100        libsbmlJNI.delete_ListOf(swigCPtr);
101      }
102      swigCPtr = 0;
103    }
104    super.delete();
105  }
106
107  
108/**
109   * Creates a new {@link ListOf} object.
110   <p>
111   * @param level the SBML Level; if not assigned, defaults to the
112   * value of {@link SBMLDocument#getDefaultLevel()}.
113   <p>
114   * @param version the Version within the SBML Level; if not assigned,
115   * defaults to the value of {@link SBMLDocument#getDefaultVersion()}.
116   <p>
117   * <p>
118 * @note Bare {@link ListOf} objects are
119 * impossible to add to SBML models.  The {@link ListOf}
120 * class is simply the base
121 * of <em>other</em> classes in
122 * libSBML.  Calling programs are not intended to create bare {@link ListOf}
123 * objects themselves.
124   <p>
125   * <p>
126 * @note Attempting to add an object to an {@link SBMLDocument} having a different
127 * combination of SBML Level, Version and XML namespaces than the object
128 * itself will result in an error at the time a caller attempts to make the
129 * addition.  A parent object must have compatible Level, Version and XML
130 * namespaces.  (Strictly speaking, a parent may also have more XML
131 * namespaces than a child, but the reverse is not permitted.)  The
132 * restriction is necessary to ensure that an SBML model has a consistent
133 * overall structure.  This requires callers to manage their objects
134 * carefully, but the benefit is increased flexibility in how models can be
135 * created by permitting callers to create objects bottom-up if desired.  In
136 * situations where objects are not yet attached to parents (e.g.,
137 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
138 * libSBML determine such things as whether it is valid to assign a
139 * particular value to an attribute.
140   <p>
141   * 
142</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
143The native C++ implementation of this method defines a default argument
144value. In the documentation generated for different libSBML language
145bindings, you may or may not see corresponding arguments in the method
146declarations. For example, in Java and C#, a default argument is handled by
147declaring two separate methods, with one of them having the argument and
148the other one lacking the argument. However, the libSBML documentation will
149be <em>identical</em> for both methods. Consequently, if you are reading
150this and do not see an argument even though one is described, please look
151for descriptions of other variants of this method near where this one
152appears in the documentation.
153</dd></dl>
154 
155   */ public
156 ListOf(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
157    this(libsbmlJNI.new_ListOf__SWIG_0(level, version), true);
158  }
159
160  
161/**
162   * Creates a new {@link ListOf} object.
163   <p>
164   * @param level the SBML Level; if not assigned, defaults to the
165   * value of {@link SBMLDocument#getDefaultLevel()}.
166   <p>
167   * @param version the Version within the SBML Level; if not assigned,
168   * defaults to the value of {@link SBMLDocument#getDefaultVersion()}.
169   <p>
170   * <p>
171 * @note Bare {@link ListOf} objects are
172 * impossible to add to SBML models.  The {@link ListOf}
173 * class is simply the base
174 * of <em>other</em> classes in
175 * libSBML.  Calling programs are not intended to create bare {@link ListOf}
176 * objects themselves.
177   <p>
178   * <p>
179 * @note Attempting to add an object to an {@link SBMLDocument} having a different
180 * combination of SBML Level, Version and XML namespaces than the object
181 * itself will result in an error at the time a caller attempts to make the
182 * addition.  A parent object must have compatible Level, Version and XML
183 * namespaces.  (Strictly speaking, a parent may also have more XML
184 * namespaces than a child, but the reverse is not permitted.)  The
185 * restriction is necessary to ensure that an SBML model has a consistent
186 * overall structure.  This requires callers to manage their objects
187 * carefully, but the benefit is increased flexibility in how models can be
188 * created by permitting callers to create objects bottom-up if desired.  In
189 * situations where objects are not yet attached to parents (e.g.,
190 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
191 * libSBML determine such things as whether it is valid to assign a
192 * particular value to an attribute.
193   <p>
194   * 
195</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
196The native C++ implementation of this method defines a default argument
197value. In the documentation generated for different libSBML language
198bindings, you may or may not see corresponding arguments in the method
199declarations. For example, in Java and C#, a default argument is handled by
200declaring two separate methods, with one of them having the argument and
201the other one lacking the argument. However, the libSBML documentation will
202be <em>identical</em> for both methods. Consequently, if you are reading
203this and do not see an argument even though one is described, please look
204for descriptions of other variants of this method near where this one
205appears in the documentation.
206</dd></dl>
207 
208   */ public
209 ListOf(long level) throws org.sbml.libsbml.SBMLConstructorException {
210    this(libsbmlJNI.new_ListOf__SWIG_1(level), true);
211  }
212
213  
214/**
215   * Creates a new {@link ListOf} object.
216   <p>
217   * @param level the SBML Level; if not assigned, defaults to the
218   * value of {@link SBMLDocument#getDefaultLevel()}.
219   <p>
220   * @param version the Version within the SBML Level; if not assigned,
221   * defaults to the value of {@link SBMLDocument#getDefaultVersion()}.
222   <p>
223   * <p>
224 * @note Bare {@link ListOf} objects are
225 * impossible to add to SBML models.  The {@link ListOf}
226 * class is simply the base
227 * of <em>other</em> classes in
228 * libSBML.  Calling programs are not intended to create bare {@link ListOf}
229 * objects themselves.
230   <p>
231   * <p>
232 * @note Attempting to add an object to an {@link SBMLDocument} having a different
233 * combination of SBML Level, Version and XML namespaces than the object
234 * itself will result in an error at the time a caller attempts to make the
235 * addition.  A parent object must have compatible Level, Version and XML
236 * namespaces.  (Strictly speaking, a parent may also have more XML
237 * namespaces than a child, but the reverse is not permitted.)  The
238 * restriction is necessary to ensure that an SBML model has a consistent
239 * overall structure.  This requires callers to manage their objects
240 * carefully, but the benefit is increased flexibility in how models can be
241 * created by permitting callers to create objects bottom-up if desired.  In
242 * situations where objects are not yet attached to parents (e.g.,
243 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
244 * libSBML determine such things as whether it is valid to assign a
245 * particular value to an attribute.
246   <p>
247   * 
248</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
249The native C++ implementation of this method defines a default argument
250value. In the documentation generated for different libSBML language
251bindings, you may or may not see corresponding arguments in the method
252declarations. For example, in Java and C#, a default argument is handled by
253declaring two separate methods, with one of them having the argument and
254the other one lacking the argument. However, the libSBML documentation will
255be <em>identical</em> for both methods. Consequently, if you are reading
256this and do not see an argument even though one is described, please look
257for descriptions of other variants of this method near where this one
258appears in the documentation.
259</dd></dl>
260 
261   */ public
262 ListOf() throws org.sbml.libsbml.SBMLConstructorException {
263    this(libsbmlJNI.new_ListOf__SWIG_2(), true);
264  }
265
266  
267/**
268   * Creates a new {@link ListOf} with a given {@link SBMLNamespaces} object.
269   <p>
270   * @param sbmlns the set of SBML namespaces that this {@link ListOf} should
271   * contain.
272   <p>
273   * <p>
274 * @note Bare {@link ListOf} objects are
275 * impossible to add to SBML models.  The {@link ListOf}
276 * class is simply the base
277 * of <em>other</em> classes in
278 * libSBML.  Calling programs are not intended to create bare {@link ListOf}
279 * objects themselves.
280   <p>
281   * <p>
282 * @note Attempting to add an object to an {@link SBMLDocument} having a different
283 * combination of SBML Level, Version and XML namespaces than the object
284 * itself will result in an error at the time a caller attempts to make the
285 * addition.  A parent object must have compatible Level, Version and XML
286 * namespaces.  (Strictly speaking, a parent may also have more XML
287 * namespaces than a child, but the reverse is not permitted.)  The
288 * restriction is necessary to ensure that an SBML model has a consistent
289 * overall structure.  This requires callers to manage their objects
290 * carefully, but the benefit is increased flexibility in how models can be
291 * created by permitting callers to create objects bottom-up if desired.  In
292 * situations where objects are not yet attached to parents (e.g.,
293 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
294 * libSBML determine such things as whether it is valid to assign a
295 * particular value to an attribute.
296   */ public
297 ListOf(SBMLNamespaces sbmlns) throws org.sbml.libsbml.SBMLConstructorException {
298    this(libsbmlJNI.new_ListOf__SWIG_3(SBMLNamespaces.getCPtr(sbmlns), sbmlns), true);
299  }
300
301  
302/**
303   * Copy constructor; creates a copy of this {@link ListOf}.
304   <p>
305   * @param orig the {@link ListOf} instance to copy.
306   */ public
307 ListOf(ListOf orig) throws org.sbml.libsbml.SBMLConstructorException {
308    this(libsbmlJNI.new_ListOf__SWIG_4(ListOf.getCPtr(orig), orig), true);
309  }
310
311  
312/**
313   * Creates and returns a deep copy of this {@link ListOf} object.
314   <p>
315   * @return the (deep) copy of this {@link ListOf} object.
316   */ public
317 ListOf cloneObject() {
318    long cPtr = libsbmlJNI.ListOf_cloneObject(swigCPtr, this);
319    return (cPtr == 0) ? null : new ListOf(cPtr, true);
320  }
321
322  
323/**
324   * Adds an item to the end of this {@link ListOf}'s list of items.
325   <p>
326   * This method makes a clone of the <code>item</code> handed to it.  This means that
327   * when the {@link ListOf} object is destroyed, the original items will not be
328   * destroyed.  For a method with an alternative ownership behavior, see the
329   * {@link ListOf#appendAndOwn(SBase)} method.
330   <p>
331   * @param item the item to be added to the list.
332   <p>
333   * <p>
334 * @return integer value indicating success/failure of the
335 * function.   The possible values
336 * returned by this function are:
337   * <ul>
338   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
339   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
340   *
341   * </ul> <p>
342   * @see #appendAndOwn(SBase disownedItem)
343   * @see #appendFrom(ListOf list)
344   */ public
345 int append(SBase item) {
346    return libsbmlJNI.ListOf_append(swigCPtr, this, SBase.getCPtr(item), item);
347  }
348
349  
350/**
351   * Adds an item to the end of this {@link ListOf}'s list of items.
352   <p>
353   * This method does not clone the <code>disownedItem</code> handed to it; instead, it assumes
354   * ownership of it.  This means that when the {@link ListOf} is destroyed, the item
355   * will be destroyed along with it.  For a method with an alternative
356   * ownership behavior, see the {@link ListOf#append(SBase item)} method.
357   <p>
358   * @param disownedItem the item to be added to the list.
359   <p>
360   * <p>
361 * @return integer value indicating success/failure of the
362 * function.   The possible values
363 * returned by this function are:
364   * <ul>
365   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
366   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
367   *
368   * </ul> <p>
369   * @see #append(SBase item)
370   * @see #appendFrom(ListOf list)
371   */ public
372 int appendAndOwn(SBase disownedItem) {
373    return libsbmlJNI.ListOf_appendAndOwn(swigCPtr, this, SBase.getCPtrAndDisown(disownedItem), disownedItem);
374  }
375
376  
377/**
378   * Adds a clone of a list of items to this {@link ListOf}'s list.
379   <p>
380   * Note that because this clones the objects handed to it, the original
381   * items will not be destroyed when this {@link ListOf} object is destroyed.
382   <p>
383   * @param list a list of items to be added.
384   <p>
385   * <p>
386 * @return integer value indicating success/failure of the
387 * function.   The possible values
388 * returned by this function are:
389   * <ul>
390   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
391   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
392   *
393   * </ul> <p>
394   * @see #append(SBase item)
395   * @see #appendAndOwn(SBase disownedItem)
396   */ public
397 int appendFrom(ListOf list) {
398    return libsbmlJNI.ListOf_appendFrom(swigCPtr, this, ListOf.getCPtr(list), list);
399  }
400
401  
402/**
403   * Inserts an item at a given position in this {@link ListOf}'s list of items.
404   <p>
405   * This variant of the method makes a clone of the <code>item</code> handed to it.
406   * This means that when the {@link ListOf} is destroyed, the original <code>item</code> will
407   * <em>not</em> be destroyed.
408   <p>
409   * @param location the location in the list where to insert the item.
410   * @param item the item to be inserted to the list.
411   <p>
412   * <p>
413 * @return integer value indicating success/failure of the
414 * function.   The possible values
415 * returned by this function are:
416   * <ul>
417   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
418   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
419   *
420   * </ul> <p>
421   * @see #insertAndOwn(int location, SBase item)
422   */ public
423 int insert(int location, SBase item) {
424    return libsbmlJNI.ListOf_insert(swigCPtr, this, location, SBase.getCPtr(item), item);
425  }
426
427  
428/**
429   * Inserts an item at a given position in this {@link ListOf}'s list of items.
430   <p>
431   * This variant of the method does not make a clone of the <code>disownedItem</code> handed to it.
432   * This means that when the {@link ListOf} is destroyed, the original <code>item</code>
433   * <em>will</em> be destroyed.
434   <p>
435   * @param location the location where to insert the item
436   * @param disownedItem the item to be inserted to the list
437   <p>
438   * <p>
439 * @return integer value indicating success/failure of the
440 * function.   The possible values
441 * returned by this function are:
442   * <ul>
443   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
444   * <li> {@link libsbmlConstants#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT}
445   *
446   * </ul> <p>
447   * @see #insert(int location, SBase item)
448   */ public
449 int insertAndOwn(int location, SBase disownedItem) {
450    return libsbmlJNI.ListOf_insertAndOwn(swigCPtr, this, location, SBase.getCPtrAndDisown(disownedItem), disownedItem);
451  }
452
453  
454/**
455   * Get an item from the list.
456   <p>
457   * @param n the index number of the item to get.
458   <p>
459   * @return the <em>n</em>th item in this {@link ListOf} items, or a null pointer if
460   * the index number <code>n</code> refers to a nonexistent position in this list.
461   <p>
462   * @see #size()
463   */ public
464 SBase get(long n) {
465  return libsbml.DowncastSBase(libsbmlJNI.ListOf_get__SWIG_0(swigCPtr, this, n), false);
466}
467
468  
469/**
470   * Returns the first child element found that has the given identifier.
471   <p>
472   * This method searches this {@link ListOf}'s list of items for SBML objects based
473   * on their 'id' attribute value in the model-wide <code>SId</code>
474   * identifier namespace.
475   <p>
476   * @param id string representing the id of the object to find.
477   <p>
478   * @return the first element found with the given <code>id</code>, or <code>null</code> if no
479   * such object is found.
480   */ public
481 SBase getElementBySId(String id) {
482  return libsbml.DowncastSBase(libsbmlJNI.ListOf_getElementBySId(swigCPtr, this, id), false);
483}
484
485  
486/**
487   * Returns the first child element found with the given meta-identifier.
488   <p>
489   * @param metaid string representing the 'metaid' attribute of the object
490   * to find.
491   <p>
492   * @return the first element found with the given <code>metaid</code>, or <code>null</code> if
493   * no such object is found.
494   */ public
495 SBase getElementByMetaId(String metaid) {
496  return libsbml.DowncastSBase(libsbmlJNI.ListOf_getElementByMetaId(swigCPtr, this, metaid), false);
497}
498
499  
500/**
501   * Removes all items in this {@link ListOf} object.
502   <p>
503   * If parameter <code>doDelete</code> is <code>true</code> (default), all items in this {@link ListOf}
504   * object are deleted and cleared, and thus the caller doesn't have to
505   * delete those items.  Otherwise, all items are cleared only from this
506   * {@link ListOf} object; the caller is still responsible for deleting the actual
507   * items.  (In the latter case, callers are advised to store pointers to
508   * all items elsewhere before calling this function.)
509   <p>
510   * @param doDelete if <code>true</code> (default), all items are deleted and cleared.
511   * Otherwise, all items are just cleared and not deleted.
512   <p>
513   * 
514</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
515The native C++ implementation of this method defines a default argument
516value. In the documentation generated for different libSBML language
517bindings, you may or may not see corresponding arguments in the method
518declarations. For example, in Java and C#, a default argument is handled by
519declaring two separate methods, with one of them having the argument and
520the other one lacking the argument. However, the libSBML documentation will
521be <em>identical</em> for both methods. Consequently, if you are reading
522this and do not see an argument even though one is described, please look
523for descriptions of other variants of this method near where this one
524appears in the documentation.
525</dd></dl>
526 
527   */ public
528 void clear(boolean doDelete) {
529    libsbmlJNI.ListOf_clear__SWIG_0(swigCPtr, this, doDelete);
530  }
531
532  
533/**
534   * Removes all items in this {@link ListOf} object.
535   <p>
536   * If parameter <code>doDelete</code> is <code>true</code> (default), all items in this {@link ListOf}
537   * object are deleted and cleared, and thus the caller doesn't have to
538   * delete those items.  Otherwise, all items are cleared only from this
539   * {@link ListOf} object; the caller is still responsible for deleting the actual
540   * items.  (In the latter case, callers are advised to store pointers to
541   * all items elsewhere before calling this function.)
542   <p>
543   * @param doDelete if <code>true</code> (default), all items are deleted and cleared.
544   * Otherwise, all items are just cleared and not deleted.
545   <p>
546   * 
547</dl><dl class="docnote"><dt><b>Documentation note:</b></dt><dd>
548The native C++ implementation of this method defines a default argument
549value. In the documentation generated for different libSBML language
550bindings, you may or may not see corresponding arguments in the method
551declarations. For example, in Java and C#, a default argument is handled by
552declaring two separate methods, with one of them having the argument and
553the other one lacking the argument. However, the libSBML documentation will
554be <em>identical</em> for both methods. Consequently, if you are reading
555this and do not see an argument even though one is described, please look
556for descriptions of other variants of this method near where this one
557appears in the documentation.
558</dd></dl>
559 
560   */ public
561 void clear() {
562    libsbmlJNI.ListOf_clear__SWIG_1(swigCPtr, this);
563  }
564
565  
566/**
567   * Removes all items in this {@link ListOf} object and deletes its properties too.
568   <p>
569   * This performs a call to clear() with an argument of <code>true</code> (thus removing
570   * all the child objects in the list), followed by calls to various libSBML
571   * <code>unset<em>Foo</em></code> methods to delete everything else: {@link CVTerm}
572   * objects, model history objects, etc.
573   <p>
574   * <p>
575 * @return integer value indicating success/failure of the
576 * function.   The possible values
577 * returned by this function are:
578   * <ul>
579   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
580   * </ul>
581   */ public
582 int removeFromParentAndDelete() {
583    return libsbmlJNI.ListOf_removeFromParentAndDelete(swigCPtr, this);
584  }
585
586  
587/**
588   * Removes the <em>n</em>th item from this {@link ListOf} list of items and returns
589   * it.
590   <p>
591   * The caller owns the returned item and is responsible for deleting it.
592   <p>
593   * @param n the index of the item to remove
594   <p>
595   * @see #size()
596   */ public
597 SBase remove(long n) {
598  return libsbml.DowncastSBase(libsbmlJNI.ListOf_remove(swigCPtr, this, n), true);
599}
600
601  
602/**
603   * Returns number of items in this {@link ListOf} list.
604   <p>
605   * @return the number of items in this {@link ListOf} items.
606   */ public
607 long size() {
608    return libsbmlJNI.ListOf_size(swigCPtr, this);
609  }
610
611  public void connectToChild() {
612    libsbmlJNI.ListOf_connectToChild(swigCPtr, this);
613  }
614
615  
616/**
617   * Returns the libSBML type code for this object, namely,
618   * {@link libsbmlConstants#SBML_LIST_OF SBML_LIST_OF}.
619   <p>
620   * <p>
621 * LibSBML attaches an identifying code to every kind of SBML object.  These
622 * are integer constants known as <em>SBML type codes</em>.  The names of all
623 * the codes begin with the characters <code>SBML_</code>.
624 * In the Java language interface for libSBML, the
625 * type codes are defined as static integer constants in the interface class
626 * {@link libsbmlConstants}.    Note that different Level&nbsp;3
627 * package plug-ins may use overlapping type codes; to identify the package
628 * to which a given object belongs, call the <code>getPackageName()</code>
629 * method on the object.
630   <p>
631   * @return the SBML type code for this object:
632   * {@link libsbmlConstants#SBML_LIST_OF SBML_LIST_OF} (default).
633   <p>
634   * @note The various {@link ListOf} classes mostly differ from each other in what they
635   * contain.  Hence, one must call getItemTypeCode() to fully determine the
636   * class of this SBML object.
637   <p>
638   * <p>
639 * @warning <span class='warning'>The specific integer values of the possible
640 * type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
641 * packages,  To fully identify the correct code, <strong>it is necessary to
642 * invoke both getTypeCode() and getPackageName()</strong>.</span>
643   <p>
644   * @see #getItemTypeCode()
645   * @see #getElementName()
646   * @see #getPackageName()
647   */ public
648 int getTypeCode() {
649    return libsbmlJNI.ListOf_getTypeCode(swigCPtr, this);
650  }
651
652  
653/**
654   * Get the type code of the objects contained in this {@link ListOf}.
655   <p>
656   * <p>
657 * LibSBML attaches an identifying code to every kind of SBML object.  These
658 * are integer constants known as <em>SBML type codes</em>.  The names of all
659 * the codes begin with the characters <code>SBML_</code>.
660 * In the Java language interface for libSBML, the
661 * type codes are defined as static integer constants in the interface class
662 * {@link libsbmlConstants}.    Note that different Level&nbsp;3
663 * package plug-ins may use overlapping type codes; to identify the package
664 * to which a given object belongs, call the <code>getPackageName()</code>
665 * method on the object.
666   <p>
667   * Classes that inherit from the {@link ListOf} class should override this method
668   * to return the SBML type code for the objects contained in this {@link ListOf}.
669   * If they do not, this method will return
670   * {@link libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN}
671   <p>
672   * @return The {@link ListOf} base class contains no SBML objects, and therefore
673   * this method returns {@link libsbmlConstants#SBML_UNKNOWN SBML_UNKNOWN}.
674   <p>
675   * @see #getElementName()
676   * @see #getPackageName()
677   */ public
678 int getItemTypeCode() {
679    return libsbmlJNI.ListOf_getItemTypeCode(swigCPtr, this);
680  }
681
682  
683/**
684   * Returns the XML element name of this object, which for {@link ListOf}, is
685   * always <code>'listOf'.</code>
686   <p>
687   * @return the XML name of this element.
688   */ public
689 String getElementName() {
690    return libsbmlJNI.ListOf_getElementName(swigCPtr, this);
691  }
692
693  
694/** * @internal */ public
695 void enablePackageInternal(String pkgURI, String pkgPrefix, boolean flag) {
696    libsbmlJNI.ListOf_enablePackageInternal(swigCPtr, this, pkgURI, pkgPrefix, flag);
697  }
698
699}