Package org.cytoscape.equations
Class AbstractNode
- java.lang.Object
-
- org.cytoscape.equations.AbstractNode
-
- All Implemented Interfaces:
TreeNode
public abstract class AbstractNode extends Object implements TreeNode
A node in the parse tree.Module:
equations-apiTo 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 (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.
-
-
Constructor Summary
Constructors Constructor Description AbstractNode(int sourceLocation)Base class constructor for anyNodetype.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidgenCode(Stack<CodeAndSourceLocation> codeStack)Generated code for this node and pushes it onto the execution stack.abstract TreeNodegetLeftChild()Returns the left child if it exists or null if it doesn't.abstract TreeNodegetRightChild()Returns the right child if it exists or null if it doesn't.intgetSourceLocation()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 ClassgetType()Returns the type of this node.abstract StringtoString()Returns sStringrepresentation of this node.
-
-
-
Method Detail
-
getSourceLocation
public final int getSourceLocation()
Description copied from interface:TreeNodeReturns 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:
getSourceLocationin interfaceTreeNode- Returns:
- the location in the source code that resulted in this node
-
toString
public abstract String toString()
Returns sStringrepresentation of this node.
-
getType
public abstract Class getType()
Description copied from interface:TreeNodeReturns the type of this node.
-
getLeftChild
public abstract TreeNode getLeftChild()
Description copied from interface:TreeNodeReturns the left child if it exists or null if it doesn't.- Specified by:
getLeftChildin interfaceTreeNode- Returns:
- the left child, if any, of this node in the parse tree
-
getRightChild
public abstract TreeNode getRightChild()
Description copied from interface:TreeNodeReturns the right child if it exists or null if it doesn't.- Specified by:
getRightChildin interfaceTreeNode- Returns:
- the right child, if any, of this node in the parse tree
-
genCode
public abstract void genCode(Stack<CodeAndSourceLocation> codeStack)
Description copied from interface:TreeNodeGenerated code for this node and pushes it onto the execution stack.
-
-