Package org.cytoscape.equations
Class AbstractNode
java.lang.Object
org.cytoscape.equations.AbstractNode
- All Implemented Interfaces:
TreeNode
A node in the parse tree.
Cytoscape Backwards Compatibility (Abstract Class): This class is abstract and meant to be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.
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>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
genCode
(Stack<CodeAndSourceLocation> codeStack) Generated code for this node and pushes it onto the execution stack.abstract TreeNode
Returns the left child if it exists or null if it doesn't.abstract TreeNode
Returns the right child if it exists or null if it doesn't.final int
Returns the start of the location in the equation where the code was found that was turned into a node in the parse tree.abstract Class
getType()
Returns the type of this node.abstract String
toString()
Returns sString
representation of this node.
-
Constructor Details
-
AbstractNode
public AbstractNode(int sourceLocation) Base class constructor for anyNode
type.- Parameters:
sourceLocation
- start of the location in the equation where the code was found that was turned into a node in the parse tree
-
-
Method Details
-
getSourceLocation
public final int getSourceLocation()Description copied from interface:TreeNode
Returns the start of the location in the equation where the code was found that was turned into a node in the parse tree.- Specified by:
getSourceLocation
in interfaceTreeNode
- Returns:
- the location in the source code that resulted in this node
-
toString
Returns sString
representation of this node. -
getType
Description copied from interface:TreeNode
Returns the type of this node. -
getLeftChild
Description copied from interface:TreeNode
Returns the left child if it exists or null if it doesn't.- Specified by:
getLeftChild
in interfaceTreeNode
- Returns:
- the left child, if any, of this node in the parse tree
-
getRightChild
Description copied from interface:TreeNode
Returns the right child if it exists or null if it doesn't.- Specified by:
getRightChild
in interfaceTreeNode
- Returns:
- the right child, if any, of this node in the parse tree
-
genCode
Description copied from interface:TreeNode
Generated code for this node and pushes it onto the execution stack.
-