public class ListOfGroups extends ListOf
Constructor and Description |
---|
ListOfGroups()
Creates a new ListOfGroups with the given level, version, and package version.
|
ListOfGroups(GroupsPkgNamespaces groupsns)
Creates a new ListOfGroups with the given
GroupsPkgNamespaces object. |
ListOfGroups(long level)
Creates a new ListOfGroups with the given level, version, and package version.
|
ListOfGroups(long level,
long version)
Creates a new ListOfGroups with the given level, version, and package version.
|
ListOfGroups(long level,
long version,
long pkgVersion)
Creates a new ListOfGroups with the given level, version, and package version.
|
Modifier and Type | Method and Description |
---|---|
ListOfGroups |
cloneObject()
Creates and returns a deep copy of this
ListOf object. |
void |
delete()
Explicitly deletes the underlying native object.
|
Group |
get(long n)
Get a Group from the ListOfGroups.
|
Group |
get(String sid)
Get a Group from the ListOfGroups
based on its identifier.
|
String |
getElementName()
Subclasses should override this method to return XML element name of
this SBML object.
|
int |
getItemTypeCode()
Get the type code of the objects contained in this
ListOf . |
Group |
remove(long n)
Removes the nth item from this ListOfGroups items and returns a pointer to
it.
|
Group |
remove(String sid)
Removes item in this ListOfGroups items with the given identifier.
|
append, appendAndOwn, appendFrom, clear, clear, connectToChild, getElementByMetaId, getElementBySId, getTypeCode, insert, insertAndOwn, removeFromParentAndDelete, size
addCVTerm, addCVTerm, appendAnnotation, appendAnnotation, appendNotes, appendNotes, deleteDisabledPlugins, deleteDisabledPlugins, disablePackage, enablePackage, equals, getAncestorOfType, getAncestorOfType, getAnnotation, getAnnotationString, getColumn, getCVTerm, getCVTerms, getDisabledPlugin, getLevel, getLine, getListOfAllElements, getListOfAllElements, getListOfAllElementsFromPlugins, getListOfAllElementsFromPlugins, getMetaId, getModel, getModelHistory, getNamespaces, getNotes, getNotesString, getNumCVTerms, getNumDisabledPlugins, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getPlugin, getPrefix, getResourceBiologicalQualifier, getResourceModelQualifier, getSBMLDocument, getSBOTerm, getSBOTermAsURL, getSBOTermID, getURI, getVersion, hashCode, hasValidLevelVersionNamespaceCombination, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetMetaId, isSetModelHistory, isSetNotes, isSetSBOTerm, isSetUserData, matchesRequiredSBMLNamespacesForAddition, matchesSBMLNamespaces, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, renameMetaIdRefs, renameSIdRefs, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetId, unsetMetaId, unsetModelHistory, unsetName, unsetNotes, unsetSBOTerm, unsetUserData
public ListOfGroups(long level, long version, long pkgVersion) throws SBMLConstructorException
SBMLConstructorException
public ListOfGroups(long level, long version) throws SBMLConstructorException
SBMLConstructorException
public ListOfGroups(long level) throws SBMLConstructorException
SBMLConstructorException
public ListOfGroups() throws SBMLConstructorException
SBMLConstructorException
public ListOfGroups(GroupsPkgNamespaces groupsns) throws SBMLConstructorException
GroupsPkgNamespaces
object.SBMLConstructorException
public void delete()
In general, application software will not need to call this method directly. The Java language binding for libSBML is implemented as a language wrapper that provides a Java interface to libSBML's underlying C++/C code. Some of the Java methods return objects that are linked to objects created not by Java code, but by C++ code. The Java objects wrapped around them will be deleted when the garbage collector invokes the corresponding C++ finalize()
methods for the objects. The finalize()
methods in turn call the ListOfGroups.delete()
method on the libSBML object.
This method is exposed in case calling programs want to ensure that the underlying object is freed immediately, and not at some arbitrary time determined by the Java garbage collector. In normal usage, callers do not need to invoke ListOfGroups.delete()
themselves.
public ListOfGroups cloneObject()
ListOf
ListOf
object.
cloneObject
 in class ListOf
public Group get(long n)
get
 in class ListOf
n
- the index number of the Group to get.
ListOf.size()
public Group get(String sid)
sid
- a string representing the identifier
of the Group to get.
ListOfGroups.get(long n)
,
ListOf.size()
public Group remove(long n)
The caller owns the returned item and is responsible for deleting it.
remove
 in class ListOf
n
- the index of the item to remove
ListOf.size()
public Group remove(String sid)
The caller owns the returned item and is responsible for deleting it.
If none of the items in this list have the identifier sid
, then @c
null is returned.
sid
- the identifier of the item to remove
public int getItemTypeCode()
ListOf
ListOf
.
LibSBML attaches an identifying code to every kind of SBML object. These
are integer constants known as SBML type codes. The names of all
the codes begin with the characters SBML_
.
In the Java language interface for libSBML, the
type codes are defined as static integer constants in the interface class
libsbmlConstants
. Note that different Level 3
package plug-ins may use overlapping type codes to identify the package
to which a given object belongs, call the getPackageName()
method on the object.
Classes that inherit from the ListOf
class should override this method
to return the SBML type code for the objects contained in this ListOf
.
If they do not, this method will return
SBML_UNKNOWN
getItemTypeCode
 in class ListOf
ListOf
or
SBML_UNKNOWN (default).ListOf.getElementName()
,
SBase.getPackageName()
public String getElementName()
getElementName
 in class ListOf