org.sbml.jsbml.math
public class ASTLogarithmNode extends ASTBinaryFunctionNode
Modifier and Type | Field and Description |
---|---|
private static org.apache.log4j.Logger |
logger
A
Logger for this class. |
private static long |
serialVersionUID |
listOfNodes
id, mathMLClass, parentSBMLObject, strict, style, type
listOfListeners, parent, resourceBundle, UNKNOWN_ATTRIBUTES, UNKNOWN_ELEMENTS
Constructor and Description |
---|
ASTLogarithmNode()
Creates a new
ASTLogarithmNode . |
ASTLogarithmNode(ASTLogarithmNode node)
Copy constructor; Creates a deep copy of the given
ASTLogarithmNode . |
ASTLogarithmNode(ASTNode2 value)
Creates a new
ASTLogarithmNode with base 10
and value ASTNode2 |
ASTLogarithmNode(ASTNode2 base,
ASTNode2 value)
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(ASTNode2 child)
Adds a child to this node.
|
ASTLogarithmNode |
clone()
Clone ASTNode2
|
ASTNode2Value<?> |
compile(ASTNode2Compiler compiler)
Compiles this
ASTNode2 and returns the result. |
ASTNode2 |
getBase()
Return the base of this
ASTLogarithmNode |
ASTNode2 |
getValue()
Return the value of this
ASTLogarithmNode |
void |
insertChild(int n,
ASTNode2 newChild)
|
boolean |
isAllowableType(ASTNode.Type type)
Returns
true iff type is allowed in this ASTNode2 |
boolean |
isSetLeftChild()
Return true iff left child has been set
|
boolean |
isSetRightChild()
Return true iff right child has been set
|
void |
setLeftChild(ASTNode2 child)
Set the left child of this
ASTBinaryFunctionNode |
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.
|
java.lang.String |
toString() |
getChildAt, getLeftChild, getRightChild, prependChild, removeChild, setRightChild, swapChildren
equals, findReferencedCallableSBases, getAllowsChildren, getChildCount, getChildren, getListOfNodes, getListOfNodes, getName, hashCode, hasUnits, isSetList, isSetName, replaceChild, setName, setParentSBMLObject
getId, getMathMLClass, getParentSBMLObject, getStyle, getType, isSetId, isSetMathMLClass, isSetParentSBMLObject, isSetStyle, isSetType, isStrict, processValue, setId, setMathMLClass, setParent, 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, isRoot, isSetParent, isSetUserObjects, notifyChildChange, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, 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 ASTLogarithmNode()
ASTLogarithmNode
.public ASTLogarithmNode(ASTLogarithmNode node)
ASTLogarithmNode
.node
- the ASTLogarithmNode
to be copied.public ASTLogarithmNode(ASTNode2 value)
ASTLogarithmNode
with base 10
and value ASTNode2
value
- ASTNode2
- must not be null
public void addChild(ASTNode2 child)
ASTBinaryFunctionNode
addChild
in class ASTBinaryFunctionNode
child
- the node to add as child.public ASTLogarithmNode clone()
ASTNode2
clone
in interface ASTNode2
clone
in class ASTBinaryFunctionNode
public ASTNode2Value<?> compile(ASTNode2Compiler compiler)
ASTNode2
ASTNode2
and returns the result.compile
in interface ASTNode2
compile
in class ASTFunction
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 ASTNode2 getBase()
ASTLogarithmNode
ASTNode2
public ASTNode2 getValue()
ASTLogarithmNode
ASTNode2
public void insertChild(int n, ASTNode2 newChild)
ASTBinaryFunctionNode
ASTNode2
at point n in the list of children of this
ASTNode2
. Inserting a child within an ASTNode2
may result in an inaccurate
representation.insertChild
in class ASTBinaryFunctionNode
n
- long the index of the ASTNode2
being addednewChild
- ASTNode2
to insert as the nth childpublic boolean isAllowableType(ASTNode.Type type)
ASTNode2
true
iff type is allowed in this ASTNode2
isAllowableType
in interface ASTNode2
isAllowableType
in class ASTFunction
public boolean isSetLeftChild()
ASTBinaryFunctionNode
isSetLeftChild
in class ASTBinaryFunctionNode
public boolean isSetRightChild()
ASTBinaryFunctionNode
isSetRightChild
in class ASTBinaryFunctionNode
public void setLeftChild(ASTNode2 child)
ASTBinaryFunctionNode
ASTBinaryFunctionNode
setLeftChild
in class ASTBinaryFunctionNode
child
- ASTNode2
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
public java.lang.String toString()
toString
in interface ASTNode2
toString
in class ASTBinaryFunctionNode