Package org.cytoscape.equations
Interface TreeNode
-
- All Known Implementing Classes:
AbstractNode
public interface TreeNode
The interface for a node within the Equation parse tree.Module:
equations-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>equations-api</artifactId> </dependency>
Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
genCode(Stack<CodeAndSourceLocation> codeStack)
Generated code for this node and pushes it onto the execution stack.TreeNode
getLeftChild()
Returns the left child if it exists or null if it doesn't.TreeNode
getRightChild()
Returns the right child if it exists or null if it doesn't.int
getSourceLocation()
Returns the start of the location in the equation where the code was found that was turned into a node in the parse tree.Class
getType()
Returns the type of this node.
-
-
-
Method Detail
-
getSourceLocation
int getSourceLocation()
Returns the start of the location in the equation where the code was found that was turned into a node in the parse tree.- Returns:
- the location in the source code that resulted in this node
-
getType
Class getType()
Returns the type of this node.- Returns:
- the type of the result of the code generated from this node will result in
-
getLeftChild
TreeNode getLeftChild()
Returns the left child if it exists or null if it doesn't.- Returns:
- the left child, if any, of this node in the parse tree
-
getRightChild
TreeNode getRightChild()
Returns the right child if it exists or null if it doesn't.- Returns:
- the right child, if any, of this node in the parse tree
-
genCode
void genCode(Stack<CodeAndSourceLocation> codeStack)
Generated code for this node and pushes it onto the execution stack.- Parameters:
codeStack
- the execution stack to push the generated code for this node.
-
-