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 * <span class="pkg-marker pkg-color-groups"><a href="group__groups.html">groups</a></span>
013 A list of {@link Member} objects.
014 <p>
015 * In the SBML Level&nbsp;3 Groups package, the membership of a group is
016 * defined by placing {@link Member} objects within a {@link ListOfMembers} object contained
017 * within a {@link Group} object.  A {@link ListOfMembers} object is optional, but, if
018 * present, it must contain at least one {@link Member} object.  In common with other
019 * ListOf___ classes in SBML, {@link ListOfMembers} is derived from {@link SBase}.  However,
020 * an uncommon feature of {@link ListOfMembers} is that it has optional 'id' and
021 * 'name' attributes that can be used in a manner discussed below.
022 <p>
023 * A {@link ListOfMembers} must have one or more {@link Member} children. Since {@link ListOfMembers}
024 * is derived from {@link SBase}, it inherits the 'sboTerm' and 'metaid' attributes,
025 * as well as the optional children Notes and Annotation. Unlike most lists
026 * of objects in SBML, however, the 'sboTerm' attribute and the Notes and
027 * Annotation children are taken here to apply directly to every SBML element
028 * referenced by each child {@link Member} of this {@link ListOfMembers}, if that referenced
029 * element has no such definition. Thus, if a referenced element has no
030 * defined 'sboTerm' attribute or child Notes or Annotation objects, that
031 * element should be considered to now have the 'sboTerm', child Notes, or
032 * child Annotation of the {@link ListOfMembers}.
033 <p>
034 * If multiple {@link ListOfMembers} have child {@link Member} elements that reference
035 * the same SBML element, and more than one {@link ListOfMembers} or {@link Member} has
036 * a value for an sboTerm attribute, Notes, or Annotation element, those
037 * {@link Member} elements should be consistent with each other: the 'sboTerm'
038 * attributes should either be identical, or one should inherit from
039 * the other; Notes should say the same or similar things; and Annotation
040 * elements should not conflict. Interpreters may choose to resolve any
041 * such conflicts arbitrarily.
042 <p>
043 * An uncommon feature about {@link ListOfMembers} is that, if it is referenced by a
044 * {@link Member} of a different {@link Group}, the <em>children</em> of the referenced
045 * {@link ListOfMembers} are also considered to be members of the referencing group.
046 * In this way, groups may be nested semantically to create larger groups out
047 * of subgroups.
048 <p>
049 * <h2>Semantics of group memberships</h2>
050 <p>
051 * <p>
052 * If a {@link Member} object within a {@link Group} object's {@link ListOfMembers} references
053 * another {@link Group} object, it is the <em>referenced {@link Group} itself</em> that is
054 * considered to be a member of the parent {@link Group}, <em>not</em> the corresponding
055 * referenced model component(s).  This is true regardless of whether those
056 * components themselves happen to point to other components using some
057 * mechanism defined by another SBML Level&nbsp;3 package (as happens, for
058 * example, in the SBML Level&nbsp;3 Hierarchical Model Composition package
059 * and its use of {@link SBaseRef}).  However, if instead a {@link Member} object references
060 * a {@link ListOfMembers} object (using the 'id' attribute permitted on
061 * {@link ListOfMembers} objects), it is the components of that {@link ListOfMembers} that
062 * are considered to be part of the parent {@link Group}.  In other words: if in some
063 * {@link Group} <em>G</em>, a {@link Member} <em>M</em> references another {@link Group}, that {@link Group} is the
064 * member of <em>G</em>; if <em>M</em> references a {@link ListOfMembers}, it is the entities
065 * referenced by the {@link Member} objects within the {@link ListOfMembers} that are
066 * the members of <em>G</em> and not the {@link ListOfMembers} object itself.
067 <p>
068 * The implication of this is that any rule that applies to members of a
069 * group (such the meaning of the 'kind' attribute, or the restrictions on
070 * the application of 'sboTerm' attributes on a {@link ListOfMembers}) applies to the
071 * child group when referenced by the {@link Group} 'id', and to the members of the
072 * child group when referenced by the {@link ListOfMembers} 'id'. In an example
073 * situation where a parent group includes two {@link Species} plus a {@link Group} which
074 * itself contains three other {@link Species}, if the parent group's {@link ListOfMembers}
075 * is given an 'sboTerm' attribute value, that {@link SBO} term applies to the two
076 * species and the group, not to the three child species members of the
077 * second group.  (Note also that in such a case, the parent group's 'kind'
078 * attribute value would almost certainly be <code>'collection'</code> or 
079 * <code>'partonomy'</code>, and not <code>'classification'</code>, as two species and a group are
080 * very unlikely to be classified as the same thing.)  In contrast, in the
081 * situation where a parent group includes two {@link Species} plus a {@link ListOfMembers}
082 * which contains three other {@link Species}, the parent group's {@link ListOfMembers}
083 * 'sboTerm' would apply to the five {@link Species}, and could be more reasonably
084 * marked as a <code>'classification'.</code>
085 <p>
086 * In a future version of this SBML Level&nbsp;3 Groups specification, it may
087 * be possible to perform set operations on groups, but for now, this type of
088 * union is the only set operation that is possible.
089 <p>
090 * Groups are not permitted to be circular: no {@link Member} may reference itself,
091 * its parent {@link ListOfMembers}, nor its parent {@link Group}. If a {@link Member} references a
092 * {@link Group}, the same restrictions apply to that subgroup's children: they may
093 * not reference the {@link Member}, its parent {@link ListOfMembers}, nor its parent {@link Group},
094 * and if any of those children reference a {@link Group}, the same restrictions apply
095 * to them, etc.
096 <p>
097 * If a {@link Member} has a 'idRef' or 'metaIdRef' attribute which references an
098 * object from a namespace that is not understood by the interpreter of the
099 * SBML model, that {@link Member} must be ignored. The referenced object will not be
100 * understood by the interpreter, and therefore has no need to become a
101 * member of the group. If an interpreter cannot tell whether a referenced
102 * object does not exist or if exists in an unparsed namespace, it may choose
103 * to produce a warning.
104 <p>
105 * @see Group
106 * @see Member
107 * @see ListOfGroups
108 */
109
110public class ListOfMembers extends ListOf {
111   private long swigCPtr;
112
113   protected ListOfMembers(long cPtr, boolean cMemoryOwn)
114   {
115     super(libsbmlJNI.ListOfMembers_SWIGUpcast(cPtr), cMemoryOwn);
116     swigCPtr = cPtr;
117   }
118
119   protected static long getCPtr(ListOfMembers obj)
120   {
121     return (obj == null) ? 0 : obj.swigCPtr;
122   }
123
124   protected static long getCPtrAndDisown (ListOfMembers obj)
125   {
126     long ptr = 0;
127
128     if (obj != null)
129     {
130       ptr             = obj.swigCPtr;
131       obj.swigCMemOwn = false;
132     }
133
134     return ptr;
135   }
136
137  protected void finalize() {
138    delete();
139  }
140
141  public synchronized void delete() {
142    if (swigCPtr != 0) {
143      if (swigCMemOwn) {
144        swigCMemOwn = false;
145        libsbmlJNI.delete_ListOfMembers(swigCPtr);
146      }
147      swigCPtr = 0;
148    }
149    super.delete();
150  }
151
152  
153/**
154   * Creates a new {@link ListOfMembers} using the given SBML Level, Version and
155   * &ldquo;groups&rdquo; package version.
156   <p>
157   * @param level a long integer, the SBML Level to assign to this
158   * {@link ListOfMembers}.
159   <p>
160   * @param version a long integer, the SBML Version to assign to this
161   * {@link ListOfMembers}.
162   <p>
163   * @param pkgVersion a long integer, the SBML Groups Version to assign to
164   * this {@link ListOfMembers}.
165   <p>
166   * <p>
167 * @note Attempting to add an object to an {@link SBMLDocument} having a different
168 * combination of SBML Level, Version and XML namespaces than the object
169 * itself will result in an error at the time a caller attempts to make the
170 * addition.  A parent object must have compatible Level, Version and XML
171 * namespaces.  (Strictly speaking, a parent may also have more XML
172 * namespaces than a child, but the reverse is not permitted.)  The
173 * restriction is necessary to ensure that an SBML model has a consistent
174 * overall structure.  This requires callers to manage their objects
175 * carefully, but the benefit is increased flexibility in how models can be
176 * created by permitting callers to create objects bottom-up if desired.  In
177 * situations where objects are not yet attached to parents (e.g.,
178 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
179 * libSBML determine such things as whether it is valid to assign a
180 * particular value to an attribute.
181   */ public
182 ListOfMembers(long level, long version, long pkgVersion) throws org.sbml.libsbml.SBMLConstructorException {
183    this(libsbmlJNI.new_ListOfMembers__SWIG_0(level, version, pkgVersion), true);
184  }
185
186  
187/**
188   * Creates a new {@link ListOfMembers} using the given SBML Level, Version and
189   * &ldquo;groups&rdquo; package version.
190   <p>
191   * @param level a long integer, the SBML Level to assign to this
192   * {@link ListOfMembers}.
193   <p>
194   * @param version a long integer, the SBML Version to assign to this
195   * {@link ListOfMembers}.
196   <p>
197   * @param pkgVersion a long integer, the SBML Groups Version to assign to
198   * this {@link ListOfMembers}.
199   <p>
200   * <p>
201 * @note Attempting to add an object to an {@link SBMLDocument} having a different
202 * combination of SBML Level, Version and XML namespaces than the object
203 * itself will result in an error at the time a caller attempts to make the
204 * addition.  A parent object must have compatible Level, Version and XML
205 * namespaces.  (Strictly speaking, a parent may also have more XML
206 * namespaces than a child, but the reverse is not permitted.)  The
207 * restriction is necessary to ensure that an SBML model has a consistent
208 * overall structure.  This requires callers to manage their objects
209 * carefully, but the benefit is increased flexibility in how models can be
210 * created by permitting callers to create objects bottom-up if desired.  In
211 * situations where objects are not yet attached to parents (e.g.,
212 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
213 * libSBML determine such things as whether it is valid to assign a
214 * particular value to an attribute.
215   */ public
216 ListOfMembers(long level, long version) throws org.sbml.libsbml.SBMLConstructorException {
217    this(libsbmlJNI.new_ListOfMembers__SWIG_1(level, version), true);
218  }
219
220  
221/**
222   * Creates a new {@link ListOfMembers} using the given SBML Level, Version and
223   * &ldquo;groups&rdquo; package version.
224   <p>
225   * @param level a long integer, the SBML Level to assign to this
226   * {@link ListOfMembers}.
227   <p>
228   * @param version a long integer, the SBML Version to assign to this
229   * {@link ListOfMembers}.
230   <p>
231   * @param pkgVersion a long integer, the SBML Groups Version to assign to
232   * this {@link ListOfMembers}.
233   <p>
234   * <p>
235 * @note Attempting to add an object to an {@link SBMLDocument} having a different
236 * combination of SBML Level, Version and XML namespaces than the object
237 * itself will result in an error at the time a caller attempts to make the
238 * addition.  A parent object must have compatible Level, Version and XML
239 * namespaces.  (Strictly speaking, a parent may also have more XML
240 * namespaces than a child, but the reverse is not permitted.)  The
241 * restriction is necessary to ensure that an SBML model has a consistent
242 * overall structure.  This requires callers to manage their objects
243 * carefully, but the benefit is increased flexibility in how models can be
244 * created by permitting callers to create objects bottom-up if desired.  In
245 * situations where objects are not yet attached to parents (e.g.,
246 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
247 * libSBML determine such things as whether it is valid to assign a
248 * particular value to an attribute.
249   */ public
250 ListOfMembers(long level) throws org.sbml.libsbml.SBMLConstructorException {
251    this(libsbmlJNI.new_ListOfMembers__SWIG_2(level), true);
252  }
253
254  
255/**
256   * Creates a new {@link ListOfMembers} using the given SBML Level, Version and
257   * &ldquo;groups&rdquo; package version.
258   <p>
259   * @param level a long integer, the SBML Level to assign to this
260   * {@link ListOfMembers}.
261   <p>
262   * @param version a long integer, the SBML Version to assign to this
263   * {@link ListOfMembers}.
264   <p>
265   * @param pkgVersion a long integer, the SBML Groups Version to assign to
266   * this {@link ListOfMembers}.
267   <p>
268   * <p>
269 * @note Attempting to add an object to an {@link SBMLDocument} having a different
270 * combination of SBML Level, Version and XML namespaces than the object
271 * itself will result in an error at the time a caller attempts to make the
272 * addition.  A parent object must have compatible Level, Version and XML
273 * namespaces.  (Strictly speaking, a parent may also have more XML
274 * namespaces than a child, but the reverse is not permitted.)  The
275 * restriction is necessary to ensure that an SBML model has a consistent
276 * overall structure.  This requires callers to manage their objects
277 * carefully, but the benefit is increased flexibility in how models can be
278 * created by permitting callers to create objects bottom-up if desired.  In
279 * situations where objects are not yet attached to parents (e.g.,
280 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
281 * libSBML determine such things as whether it is valid to assign a
282 * particular value to an attribute.
283   */ public
284 ListOfMembers() throws org.sbml.libsbml.SBMLConstructorException {
285    this(libsbmlJNI.new_ListOfMembers__SWIG_3(), true);
286  }
287
288  
289/**
290   * Creates a new {@link ListOfMembers} using the given {@link GroupsPkgNamespaces} object.
291   <p>
292   * <p>
293 * The package namespaces object used in this constructor is derived from a
294 * {@link SBMLNamespaces} object, which encapsulates SBML Level/Version/namespaces
295 * information.  It is used to communicate the SBML Level, Version, and 
296 * package version and name information used in addition to SBML Level&nbsp;3 Core.  A
297 * common approach to using libSBML's {@link SBMLNamespaces} facilities is to create an
298 * package namespace object somewhere in a program once, then hand that object
299 * as needed to object constructors of that package that accept it as and
300 * argument, such as this one.
301   <p>
302   * @param groupsns the {@link GroupsPkgNamespaces} object.
303   <p>
304   * <p>
305 * @note Attempting to add an object to an {@link SBMLDocument} having a different
306 * combination of SBML Level, Version and XML namespaces than the object
307 * itself will result in an error at the time a caller attempts to make the
308 * addition.  A parent object must have compatible Level, Version and XML
309 * namespaces.  (Strictly speaking, a parent may also have more XML
310 * namespaces than a child, but the reverse is not permitted.)  The
311 * restriction is necessary to ensure that an SBML model has a consistent
312 * overall structure.  This requires callers to manage their objects
313 * carefully, but the benefit is increased flexibility in how models can be
314 * created by permitting callers to create objects bottom-up if desired.  In
315 * situations where objects are not yet attached to parents (e.g.,
316 * {@link SBMLDocument}), knowledge of the intented SBML Level and Version help
317 * libSBML determine such things as whether it is valid to assign a
318 * particular value to an attribute.
319   */ public
320 ListOfMembers(GroupsPkgNamespaces groupsns) throws org.sbml.libsbml.SBMLConstructorException {
321    this(libsbmlJNI.new_ListOfMembers__SWIG_4(GroupsPkgNamespaces.getCPtr(groupsns), groupsns), true);
322  }
323
324  
325/**
326   * Copy constructor for {@link ListOfMembers}.
327   <p>
328   * @param orig the {@link ListOfMembers} instance to copy.
329   */ public
330 ListOfMembers(ListOfMembers orig) throws org.sbml.libsbml.SBMLConstructorException {
331    this(libsbmlJNI.new_ListOfMembers__SWIG_5(ListOfMembers.getCPtr(orig), orig), true);
332  }
333
334  
335/**
336   * Creates and returns a deep copy of this {@link ListOfMembers} object.
337   <p>
338   * @return a (deep) copy of this {@link ListOfMembers} object.
339   */ public
340 ListOfMembers cloneObject() {
341    long cPtr = libsbmlJNI.ListOfMembers_cloneObject(swigCPtr, this);
342    return (cPtr == 0) ? null : new ListOfMembers(cPtr, true);
343  }
344
345  
346/**
347   * Returns the value of the 'id' attribute of this {@link ListOfMembers}.
348   <p>
349   * @return the value of the 'id' attribute of this {@link ListOfMembers} as a string.
350   */ public
351 String getId() {
352    return libsbmlJNI.ListOfMembers_getId(swigCPtr, this);
353  }
354
355  
356/**
357   * Returns the value of the 'name' attribute of this {@link ListOfMembers}.
358   <p>
359   * @return the value of the 'name' attribute of this {@link ListOfMembers} as a
360   * string.
361   */ public
362 String getName() {
363    return libsbmlJNI.ListOfMembers_getName(swigCPtr, this);
364  }
365
366  
367/**
368   * Predicate returning <code>true</code> if this {@link ListOfMembers}'s 'id' attribute is set.
369   <p>
370   * @return <code>true</code> if this {@link ListOfMembers}'s 'id' attribute has been set,
371   * otherwise <code>false</code> is returned.
372   */ public
373 boolean isSetId() {
374    return libsbmlJNI.ListOfMembers_isSetId(swigCPtr, this);
375  }
376
377  
378/**
379   * Predicate returning <code>true</code> if this {@link ListOfMembers}'s 'name' attribute is
380   * set.
381   <p>
382   * @return <code>true</code> if this {@link ListOfMembers}'s 'name' attribute has been set,
383   * otherwise <code>false</code> is returned.
384   */ public
385 boolean isSetName() {
386    return libsbmlJNI.ListOfMembers_isSetName(swigCPtr, this);
387  }
388
389  
390/**
391   * Sets the value of the 'id' attribute of this {@link ListOfMembers}.
392   <p>
393   * @param id String& value of the 'id' attribute to be set.
394   <p>
395   * <p>
396 * @return integer value indicating success/failure of the
397 * function.   The possible values
398 * returned by this function are:
399   * <ul>
400   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
401   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
402   * </ul>
403   */ public
404 int setId(String id) {
405    return libsbmlJNI.ListOfMembers_setId(swigCPtr, this, id);
406  }
407
408  
409/**
410   * Sets the value of the 'name' attribute of this {@link ListOfMembers}.
411   <p>
412   * @param name String& value of the 'name' attribute to be set.
413   <p>
414   * <p>
415 * @return integer value indicating success/failure of the
416 * function.   The possible values
417 * returned by this function are:
418   * <ul>
419   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
420   * <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE}
421   * </ul>
422   */ public
423 int setName(String name) {
424    return libsbmlJNI.ListOfMembers_setName(swigCPtr, this, name);
425  }
426
427  
428/**
429   * Unsets the value of the 'id' attribute of this {@link ListOfMembers}.
430   <p>
431   * <p>
432 * @return integer value indicating success/failure of the
433 * function.   The possible values
434 * returned by this function are:
435   * <ul>
436   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
437   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
438   * </ul>
439   */ public
440 int unsetId() {
441    return libsbmlJNI.ListOfMembers_unsetId(swigCPtr, this);
442  }
443
444  
445/**
446   * Unsets the value of the 'name' attribute of this {@link ListOfMembers}.
447   <p>
448   * <p>
449 * @return integer value indicating success/failure of the
450 * function.   The possible values
451 * returned by this function are:
452   * <ul>
453   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
454   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
455   * </ul>
456   */ public
457 int unsetName() {
458    return libsbmlJNI.ListOfMembers_unsetName(swigCPtr, this);
459  }
460
461  
462/**
463   * Get a {@link Member} from the {@link ListOfMembers}.
464   <p>
465   * @param n a long integer representing the index of the {@link Member} to
466   * retrieve.
467   <p>
468   * @return the nth {@link Member} in this {@link ListOfMembers}.
469   <p>
470   * @see #size()
471   */ public
472 Member get(long n) {
473    long cPtr = libsbmlJNI.ListOfMembers_get__SWIG_0(swigCPtr, this, n);
474    return (cPtr == 0) ? null : new Member(cPtr, false);
475  }
476
477  
478/**
479   * Get a {@link Member} from the {@link ListOfMembers} based on its identifier.
480   <p>
481   * @param sid a string representing the identifier of the {@link Member} to retrieve.
482   <p>
483   * @return the {@link Member} in this {@link ListOfMembers} with the given id or null if no
484   * such {@link Member} exists.
485   <p>
486   * @see #size()
487   */ public
488 Member get(String sid) {
489    long cPtr = libsbmlJNI.ListOfMembers_get__SWIG_2(swigCPtr, this, sid);
490    return (cPtr == 0) ? null : new Member(cPtr, false);
491  }
492
493  
494/**
495   * Removes the nth {@link Member} from this {@link ListOfMembers} and returns a pointer to
496   * it.
497   <p>
498   * @param n a long integer representing the index of the {@link Member} to remove.
499   <p>
500   * @return a pointer to the nth {@link Member} in this {@link ListOfMembers}.
501   <p>
502   * 
503   * @note the caller owns the returned object and is responsible for deleting
504   * it.
505   <p>
506   * @see #size()
507   */ public
508 Member remove(long n) {
509    long cPtr = libsbmlJNI.ListOfMembers_remove__SWIG_0(swigCPtr, this, n);
510    return (cPtr == 0) ? null : new Member(cPtr, true);
511  }
512
513  
514/**
515   * Removes the {@link Member} from this {@link ListOfMembers} based on its identifier and
516   * returns a pointer to it.
517   <p>
518   * @param sid a string representing the identifier of the {@link Member} to remove.
519   <p>
520   * @return the {@link Member} in this {@link ListOfMembers} based on the identifier or null
521   * if no such {@link Member} exists.
522   <p>
523   * @note the caller owns the returned object and is responsible for deleting
524   * it.
525   */ public
526 Member remove(String sid) {
527    long cPtr = libsbmlJNI.ListOfMembers_remove__SWIG_1(swigCPtr, this, sid);
528    return (cPtr == 0) ? null : new Member(cPtr, true);
529  }
530
531  
532/**
533   * Adds a copy of the given {@link Member} to this {@link ListOfMembers}.
534   <p>
535   * @param m the {@link Member} object to add.
536   <p>
537   * <p>
538 * @return integer value indicating success/failure of the
539 * function.   The possible values
540 * returned by this function are:
541   * <ul>
542   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS}
543   * <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED}
544   *
545   * </ul> <p>
546   * <p>
547 * @note This method should be used with some caution.  The fact that this
548 * method <em>copies</em> the object passed to it means that the caller will be
549 * left holding a physically different object instance than the one contained
550 * inside this object.  Changes made to the original object instance (such as
551 * resetting attribute values) will <em>not affect the instance in this
552 * object</em>.  In addition, the caller should make sure to free the
553 * original object if it is no longer being used, or else a memory leak will
554 * result.  Please see other methods on this class (particularly a
555 * corresponding method whose name begins with the word <code>create</code>)
556 * for alternatives that do not lead to these issues.
557   <p>
558   * @see #createMember()
559   */ public
560 int addMember(Member m) {
561    return libsbmlJNI.ListOfMembers_addMember(swigCPtr, this, Member.getCPtr(m), m);
562  }
563
564  
565/**
566   * Get the number of {@link Member} objects in this {@link ListOfMembers}.
567   <p>
568   * @return the number of {@link Member} objects in this {@link ListOfMembers}.
569   */ public
570 long getNumMembers() {
571    return libsbmlJNI.ListOfMembers_getNumMembers(swigCPtr, this);
572  }
573
574  
575/**
576   * Creates a new {@link Member} object, adds it to this {@link ListOfMembers} object and
577   * returns the {@link Member} object created.
578   <p>
579   * @return a new {@link Member} object instance.
580   <p>
581   * @see #addMember(Member m)
582   */ public
583 Member createMember() {
584    long cPtr = libsbmlJNI.ListOfMembers_createMember(swigCPtr, this);
585    return (cPtr == 0) ? null : new Member(cPtr, false);
586  }
587
588  
589/**
590   * Get a {@link Member} from the {@link ListOfMembers} based on the IdRef to which it refers.
591   <p>
592   * @param sid a string representing the idRef attribute of the {@link Member} object
593   * to retrieve.
594   <p>
595   * @return the first {@link Member} in this {@link ListOfMembers} based on the given idRef
596   * attribute or null if no such {@link Member} exists.
597   */ public
598 Member getByIdRef(String sid) {
599    long cPtr = libsbmlJNI.ListOfMembers_getByIdRef__SWIG_0(swigCPtr, this, sid);
600    return (cPtr == 0) ? null : new Member(cPtr, false);
601  }
602
603  
604/**
605   * Returns the XML element name of this {@link ListOfMembers} object.
606   <p>
607   * For {@link ListOfMembers}, the XML element name is always <code>'listOfMembers'.</code>
608   <p>
609   * @return the name of this element, i.e. <code>'listOfMembers'.</code>
610   */ public
611 String getElementName() {
612    return libsbmlJNI.ListOfMembers_getElementName(swigCPtr, this);
613  }
614
615  
616/**
617   * Returns the libSBML type code for this {@link ListOfMembers} object.
618   <p>
619   * <p>
620 * LibSBML attaches an identifying code to every kind of SBML object.  These
621 * are integer constants known as <em>SBML type codes</em>.  The names of all
622 * the codes begin with the characters <code>SBML_</code>.
623 * In the Java language interface for libSBML, the
624 * type codes are defined as static integer constants in the interface class
625 * {@link libsbmlConstants}.    Note that different Level&nbsp;3
626 * package plug-ins may use overlapping type codes; to identify the package
627 * to which a given object belongs, call the <code>getPackageName()</code>
628 * method on the object.
629   <p>
630   * @return the SBML type code for this object:
631   <p>
632   * {@link libsbmlConstants#SBML_LIST_OF SBML_LIST_OF}
633   <p>
634   * <p>
635 * @warning <span class='warning'>The specific integer values of the possible
636 * type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
637 * packages,  To fully identify the correct code, <strong>it is necessary to
638 * invoke both getTypeCode() and getPackageName()</strong>.</span>
639   */ public
640 int getTypeCode() {
641    return libsbmlJNI.ListOfMembers_getTypeCode(swigCPtr, this);
642  }
643
644  
645/**
646   * Returns the libSBML type code for the SBML objects contained in this
647   * {@link ListOfMembers} object.
648   <p>
649   * <p>
650 * LibSBML attaches an identifying code to every kind of SBML object.  These
651 * are integer constants known as <em>SBML type codes</em>.  The names of all
652 * the codes begin with the characters <code>SBML_</code>.
653 * In the Java language interface for libSBML, the
654 * type codes are defined as static integer constants in the interface class
655 * {@link libsbmlConstants}.    Note that different Level&nbsp;3
656 * package plug-ins may use overlapping type codes; to identify the package
657 * to which a given object belongs, call the <code>getPackageName()</code>
658 * method on the object.
659   <p>
660   * @return the SBML typecode for the objects contained in this ListOfMembers:
661   <p>
662   * {@link libsbmlConstants#SBML_GROUPS_MEMBER SBML_GROUPS_MEMBER}
663   <p>
664   * <p>
665 * @warning <span class='warning'>The specific integer values of the possible
666 * type codes may be reused by different libSBML plug-ins for SBML Level&nbsp;3.
667 * packages,  To fully identify the correct code, <strong>it is necessary to
668 * invoke both getTypeCode() and getPackageName()</strong>.</span>
669   <p>
670   * @see #getElementName()
671   * @see #getPackageName()
672   */ public
673 int getItemTypeCode() {
674    return libsbmlJNI.ListOfMembers_getItemTypeCode(swigCPtr, this);
675  }
676
677  
678/**
679   * Predicate returning <code>true</code> if all the required attributes for this
680   * {@link ListOfMembers} object have been set.
681   <p>
682   * @return <code>true</code> to indicate that all the required attributes of this
683   * {@link ListOfMembers} have been set, otherwise <code>false</code> is returned.
684   <p>
685   * @note The required attributes for the {@link ListOfMembers} object are:
686   */ public
687 boolean hasRequiredAttributes() {
688    return libsbmlJNI.ListOfMembers_hasRequiredAttributes(swigCPtr, this);
689  }
690
691}