T
- java.io.Serializable
, java.lang.Cloneable
, javax.swing.tree.TreeNode
, ASTNode2
, TreeNodeWithChangeSupport
ASTCnExponentialNode
, ASTCnIntegerNode
, ASTCnRationalNode
, ASTCnRealNode
public class ASTCnNumberNode<T> extends ASTNumber
Constructor | Description |
---|---|
ASTCnNumberNode() |
Creates a new
ASTCnNumberNode that lacks a pointer
to its containing MathContainer . |
ASTCnNumberNode(java.lang.String variable) |
Creates a new
ASTCnNumberNode that lacks a pointer
to its containing MathContainer and has a variable
String . |
ASTCnNumberNode(ASTCnNumberNode<T> node) |
Copy constructor; Creates a deep copy of the given
ASTCnNumberNode . |
Modifier and Type | Method | Description |
---|---|---|
ASTCnNumberNode<T> |
clone() |
Clone ASTNode2
|
ASTNode2Value<?> |
compile(ASTNode2Compiler compiler) |
Compiles this
ASTNode2 and returns the result. |
UnitDefinition |
deriveUnit() |
Evaluates recursively this
ASTCnNumberNode and creates a new
UnitDefinition with respect to all referenced elements. |
boolean |
equals(java.lang.Object obj) |
|
T |
getNumber() |
Get the numerical base of MathML element.
|
java.lang.String |
getUnits() |
Returns the units of the MathML element represented by this ASTCnNumberNode
|
UnitDefinition |
getUnitsInstance() |
Creates or obtains a
UnitDefinition corresponding to the unit
that has been set for this ASTCnNumberNode and returns a pointer to it. |
java.lang.String |
getVariable() |
Get the variable for this
ASTNumber node |
int |
hashCode() |
|
boolean |
hasUnits() |
Returns
true if the current ASTCnNumberNode or
any of its descendants has a unit defined. |
boolean |
isAllowableType(ASTNode.Type type) |
Returns
true iff type is allowed in this ASTNode2 |
boolean |
isSetUnits() |
Returns True iff units has been set
|
void |
setNumber(T number) |
Set the numerical base of MathML element.
|
void |
setUnits(java.lang.String units) |
Set the units of the MathML element represented by this ASTCnNumberNode
|
void |
setVariable(java.lang.String variable) |
Set the variable for this
ASTNumber node |
void |
unsetUnits() |
Unset the units attribute.
|
getId, getMathMLClass, getParentSBMLObject, getStyle, getType, isSetId, isSetMathMLClass, isSetParentSBMLObject, isSetStyle, isSetType, isStrict, setId, setMathMLClass, setParent, setParentSBMLObject, setStrictness, setStyle, setType, setType, toFormula, toLaTeX, toMathML, unsetParentSBMLObject
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getParent, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isLeaf, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, toString, userObjectKeySet
getAllowsChildren, getChildAt, getChildCount
getClass, notify, notifyAll, toString, wait, wait, wait
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
public ASTCnNumberNode()
ASTCnNumberNode
that lacks a pointer
to its containing MathContainer
.public ASTCnNumberNode(ASTCnNumberNode<T> node)
ASTCnNumberNode
.node
- the ASTCnNumberNode
to be copied.public ASTCnNumberNode(java.lang.String variable)
ASTCnNumberNode
that lacks a pointer
to its containing MathContainer
and has a variable
String
.variable
- public ASTCnNumberNode<T> clone()
ASTNode2
public ASTNode2Value<?> compile(ASTNode2Compiler compiler)
ASTNode2
ASTNode2
and returns the result.compiler
- An instance of an ASTNode2Compiler
that provides
methods to translate this ASTNode2
into something
different.ASTNode2Value
. The content of the
wrapper depends on the ASTNode2Compiler
used to create it.
However, this ASTNode2
will ensure that level and version
are set appropriately according to this node's parent SBML
object.public UnitDefinition deriveUnit() throws SBMLException
ASTCnNumberNode
and creates a new
UnitDefinition with respect to all referenced elements.SBMLException
- if they are problems going through the ASTNode2
tree.public boolean equals(java.lang.Object obj)
equals
in class AbstractASTNode
public T getNumber()
PropertyUndefinedError
public java.lang.String getUnits()
public UnitDefinition getUnitsInstance()
UnitDefinition
corresponding to the unit
that has been set for this ASTCnNumberNode
and returns a pointer to it.
Note that in case that this ASTCnNumberNode
is associated with a
Kind
, the created UnitDefinition
will not be part of the
model, it is just a container for the Kind
.UnitDefinition
or null
.public java.lang.String getVariable()
ASTNumber
nodeString
public int hashCode()
hashCode
in class AbstractASTNode
public boolean hasUnits()
true
if the current ASTCnNumberNode
or
any of its descendants has a unit defined.true
if the current ASTCnNumberNode
or
any of its descendants has a unit defined.public boolean isAllowableType(ASTNode.Type type)
ASTNode2
true
iff type is allowed in this ASTNode2
public boolean isSetUnits()
public void setNumber(T number)
number
- public void setUnits(java.lang.String units)
units
- public void setVariable(java.lang.String variable)
ASTNumber
nodevariable
- String
public void unsetUnits()