public class ASTCnRealNode extends ASTCnNumberNode<java.lang.Double>
Modifier and Type | Field and Description |
---|---|
private static org.apache.log4j.Logger |
logger
A
Logger for this class. |
private static long |
serialVersionUID |
number
id, mathMLClass, parentSBMLObject, strict, style, type
listOfListeners, parent, resourceBundle
Constructor and Description |
---|
ASTCnRealNode()
Creates a new
ASTCnRealNode that lacks a pointer
to its containing MathContainer . |
ASTCnRealNode(ASTCnRealNode node)
Copy constructor; Creates a deep copy of the given
ASTCnRealNode . |
ASTCnRealNode(double value)
Creates a new
ASTCnRealNode that lacks a pointer
to its containing MathContainer but has the
specified real value. |
Modifier and Type | Method and Description |
---|---|
ASTCnRealNode |
clone()
Clone ASTNode2
|
ASTNode2Value<?> |
compile(ASTNode2Compiler compiler)
Compiles this
ASTNode2 and returns the result. |
boolean |
equals(java.lang.Object obj) |
double |
getReal()
Get the real value of this node.
|
int |
hashCode() |
boolean |
isAllowableType(ASTNode.Type type)
Returns
true iff type is allowed in this ASTNode2 |
boolean |
isInfinity()
|
boolean |
isNegInfinity()
Returns
true if this ASTCnRealNode represents the special IEEE 754 value 'negative
infinity' Double.NEGATIVE_INFINITY , false otherwise. |
boolean |
isSetReal()
Returns
true iff a value has been set |
void |
setReal(double real)
Set the value of this node
|
java.lang.String |
toFormula()
Converts this
ASTNode2 to a text string using a specific syntax
for mathematical formulas. |
java.lang.String |
toLaTeX()
Converts this node recursively into a LaTeX formatted String.
|
java.lang.String |
toMathML()
Converts this node recursively into a MathML string that corresponds to
the subset of MathML defined in the SBML specification.
|
deriveUnit, getNumber, getUnits, getUnitsInstance, getVariable, hasUnits, isSetNumber, isSetUnits, isSetVariable, setNumber, setUnits, setVariable, unsetUnits
getAllowsChildren, getChildAt, getChildCount
getId, getMathMLClass, getParentSBMLObject, getStyle, getType, isSetId, isSetMathMLClass, isSetParentSBMLObject, isSetStyle, isSetType, isStrict, processValue, setId, setMathMLClass, setParent, setParentSBMLObject, setStrictness, setStyle, setType, setType, unsetParentSBMLObject
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getParent, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isLeaf, isReadingInProgress, isRoot, isSetParent, isSetUserObjects, notifyChildChange, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, toString, userObjectKeySet
finalize, getClass, notify, notifyAll, 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
private static final long serialVersionUID
private static final org.apache.log4j.Logger logger
Logger
for this class.public ASTCnRealNode()
ASTCnRealNode
that lacks a pointer
to its containing MathContainer
.public ASTCnRealNode(ASTCnRealNode node)
ASTCnRealNode
.node
- the ASTCnRealNode
to be copied.public ASTCnRealNode(double value)
ASTCnRealNode
that lacks a pointer
to its containing MathContainer
but has the
specified real value.value
- public ASTCnRealNode clone()
ASTNode2
clone
in interface ASTNode2
clone
in class ASTCnNumberNode<java.lang.Double>
public ASTNode2Value<?> compile(ASTNode2Compiler compiler)
ASTNode2
ASTNode2
and returns the result.compile
in interface ASTNode2
compile
in class ASTCnNumberNode<java.lang.Double>
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 boolean equals(java.lang.Object obj)
equals
in class ASTCnNumberNode<java.lang.Double>
public double getReal()
public int hashCode()
hashCode
in class ASTCnNumberNode<java.lang.Double>
public boolean isAllowableType(ASTNode.Type type)
ASTNode2
true
iff type is allowed in this ASTNode2
isAllowableType
in interface ASTNode2
isAllowableType
in class ASTCnNumberNode<java.lang.Double>
public boolean isInfinity()
true
if this ASTCnRealNode
is the special IEEE 754 value
infinity,
false
otherwise.public boolean isNegInfinity()
true
if this ASTCnRealNode
represents the special IEEE 754 value 'negative
infinity' Double.NEGATIVE_INFINITY
, false
otherwise.true
if this ASTCnRealNode
is Double.NEGATIVE_INFINITY
, false
otherwise.public boolean isSetReal()
true
iff a value has been setpublic void setReal(double real)
real
- public java.lang.String toFormula() throws SBMLException
ASTNode2
Converts this ASTNode2
to a text string using a specific syntax
for mathematical formulas.
The text-string form of mathematical formulas produced by formulaToString() and read by parseFormula() are simple C-inspired infix notation taken from SBML Level 1. A formula in this text-string form therefore can be handed to a program that understands SBML Level 1 mathematical expressions, or used as part of a formula translation system. The syntax is described in detail in the documentation for ASTNode.
toFormula
in interface ASTNode2
toFormula
in class AbstractASTNode
null
is
returned if the given argument is null
.SBMLException
- if there is a problem in the ASTNode2
tree.public java.lang.String toLaTeX() throws SBMLException
ASTNode2
toLaTeX
in interface ASTNode2
toLaTeX
in class AbstractASTNode
SBMLException
- if there is a problem in the AbstractASTNode tree.public java.lang.String toMathML()
ASTNode2
toMathML
in interface ASTNode2
toMathML
in class AbstractASTNode