java.io.Serializable
, java.lang.Cloneable
, javax.swing.tree.TreeNode
, CallableSBase
, MathContainer
, NamedSBase
, NamedSBaseWithDerivedUnit
, SBase
, SBaseWithDerivedUnit
, UniqueNamedSBase
, UniqueSId
, TreeNodeWithChangeSupport
public class FunctionDefinition extends AbstractMathContainer implements CallableSBase, UniqueNamedSBase, NamedSBase
FunctionDefinition
s were introduced to SBML in Level 2, this
class must not be used for models in Level 1.JSBML_WRONG_SBO_TERM
Constructor | Description |
---|---|
FunctionDefinition() |
Creates a FunctionDefinition instance.
|
FunctionDefinition(int level,
int version) |
Creates a FunctionDefinition instance from a level and version.
|
FunctionDefinition(java.lang.String id,
int level,
int version) |
Creates a FunctionDefinition instance from an id, level and version.
|
FunctionDefinition(java.lang.String id,
ASTNode lambda,
int level,
int version) |
Creates a FunctionDefinition instance from an id, ASTNode, level and
version.
|
FunctionDefinition(FunctionDefinition sb) |
Creates a FunctionDefinition instance from a given FunctionDefinition.
|
Modifier and Type | Method | Description |
---|---|---|
FunctionDefinition |
clone() |
Creates a deep copy of this object, i.e., a new
SBase with the same
properties
like this one. |
ASTNode |
getArgument(int n) |
Get the nth argument to this function.
|
ASTNode |
getArgument(java.lang.String name) |
Get the argument named name to this
FunctionDefinition . |
int |
getArgumentCount() |
Get the number of arguments (bound variables) taken by this
FunctionDefinition . |
ASTNode |
getBody() |
Get the mathematical expression that is the body of this
FunctionDefinition object. |
int |
getNumArguments() |
Get the number of arguments (bound variables) taken by this
FunctionDefinition . |
ListOf<FunctionDefinition> |
getParent() |
This is equivalent to calling
AbstractSBase.getParentSBMLObject() , but this
method is needed for TreeNode . |
boolean |
isIdMandatory() |
Returns
true if the identifier of this
SBase is required to be defined (i.e., not null )
in the definition of SBML. |
void |
setMath(ASTNode math) |
Sets the math
ASTNode of this MathContainer to the given
value. |
containsUndeclaredUnits, getAllowsChildren, getChildAt, getChildCount, getDerivedUnitDefinition, getDerivedUnits, getFormula, getMath, getMathMLString, isSetMath, readAttribute, setFormula, unsetFormula, unsetMath, writeXMLAttributes
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, addResources, appendAnnotation, appendAnnotation, appendNotes, appendNotes, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, equals, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAllDeclaredNamespaces, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementByMetaId, getElementBySId, getElementName, getExtension, getExtensionCount, getExtensionPackages, getFirstElementIndex, getHistory, getId, getLevel, getLevelAndVersion, getMetaId, getModel, getName, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hasExtension, hashCode, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetId, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetName, isSetNotes, isSetPackageVErsion, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, isValidLevelAndVersionCombination, isValidMetaId, registerChild, removeCVTerm, removeCVTerm, removeDeclaredNamespaceByNamespace, removeDeclaredNamespaceByPrefix, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setAnnotation, setHistory, setId, setLevel, setMetaId, setName, setNamespace, setNotes, setNotes, setPackageVersion, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, toString, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetId, unsetMetaId, unsetName, unsetNamespace, unsetNotes, unsetPlugin, unsetSBOTerm
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isLeaf, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, setParent, userObjectKeySet
getId, getName, isSetId, isSetName, setId, setName, unsetId, unsetName
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendAnnotation, appendAnnotation, appendNotes, appendNotes, createPlugin, disablePackage, enablePackage, enablePackage, equals, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementByMetaId, getElementBySId, getElementName, getExtension, getExtensionCount, getExtensionPackages, getHistory, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hasExtension, hashCode, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetPackageVErsion, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, readAttribute, registerChild, removeCVTerm, removeCVTerm, removeDeclaredNamespaceByNamespace, removeDeclaredNamespaceByPrefix, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTreeNodeChangeListener, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setAnnotation, setHistory, setLevel, setMetaId, setNotes, setNotes, setPackageVersion, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNotes, unsetPlugin, unsetSBOTerm, writeXMLAttributes
containsUndeclaredUnits, getDerivedUnitDefinition, getDerivedUnits
children, getAllowsChildren, getChildAt, getChildCount, getIndex, isLeaf
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
public FunctionDefinition()
null
.public FunctionDefinition(FunctionDefinition sb)
sb
- the FunctionDefinition
to clonepublic FunctionDefinition(int level, int version)
null
.level
- the SBML levelversion
- the SBML versionpublic FunctionDefinition(java.lang.String id, ASTNode lambda, int level, int version)
null
. If the ASTNode is not of type lambda,
an IllegalArgumentException is thrown.id
- the function definition idlambda
- the ASTNode representing the function mathlevel
- the SBML levelversion
- the SBML versionpublic FunctionDefinition(java.lang.String id, int level, int version)
id
- the function definition idlevel
- the SBML levelversion
- the SBML versionpublic FunctionDefinition clone()
SBase
SBase
with the same
properties
like this one.clone
in interface SBase
clone
in class AbstractMathContainer
public ASTNode getArgument(int n)
getArgumentCount()
.n
- an integer index for the argument sought.FunctionDefinition
.public ASTNode getArgument(java.lang.String name)
FunctionDefinition
.name
- the exact name (case-sensitive) of the sought-after argumentpublic ASTNode getBody()
FunctionDefinition
object.FunctionDefinition
as an Abstract Syntax
Tree, or null if no body is defined.public int getNumArguments()
FunctionDefinition
.FunctionDefinition
.getArgumentCount()
public int getArgumentCount()
FunctionDefinition
.FunctionDefinition
.public ListOf<FunctionDefinition> getParent()
AbstractSBase
AbstractSBase.getParentSBMLObject()
, but this
method is needed for TreeNode
.getParent
in interface javax.swing.tree.TreeNode
getParent
in class AbstractSBase
AbstractSBase.getParentSBMLObject()
public boolean isIdMandatory()
SBase
true
if the identifier of this
SBase
is required to be defined (i.e., not null
)
in the definition of SBML.isIdMandatory
in interface NamedSBase
isIdMandatory
in interface SBase
isIdMandatory
in class AbstractSBase
true
if the identifier of this element must be set in
order to create a valid SBML representation. false
otherwise, i.e., if the identifier can be understood as an optional
attribute.public void setMath(ASTNode math)
MathContainer
ASTNode
of this MathContainer
to the given
value.setMath
in interface MathContainer
setMath
in class AbstractMathContainer
math
- an abstract syntax tree.