Cytoscape 3.0.1 API

org.cytoscape.equations
Class AbstractNode

java.lang.Object
  extended by org.cytoscape.equations.AbstractNode
All Implemented Interfaces:
TreeNode

public abstract class AbstractNode
extends Object
implements 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.

Constructor Summary
AbstractNode(int sourceLocation)
          Base class constructor for any Node type.
 
Method Summary
abstract  void genCode(Stack<CodeAndSourceLocation> codeStack)
          Generated code for this node and pushes it onto the execution stack.
abstract  TreeNode getLeftChild()
          Returns the left child if it exists or null if it doesn't.
abstract  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.
abstract  Class getType()
          Returns the type of this node.
abstract  String toString()
          Returns s String representation of this node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractNode

public AbstractNode(int sourceLocation)
Base class constructor for any Node 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 Detail

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 interface TreeNode
Returns:
the location in the source code that resulted in this node

toString

public abstract String toString()
Returns s String representation of this node.

Overrides:
toString in class Object
Returns:
a textual representation of this node Note: This is typically only used for debugging.

getType

public abstract Class getType()
Description copied from interface: TreeNode
Returns the type of this node.

Specified by:
getType in interface TreeNode
Returns:
the type of the result of the code generated from this node will result in

getLeftChild

public abstract TreeNode getLeftChild()
Description copied from interface: TreeNode
Returns the left child if it exists or null if it doesn't.

Specified by:
getLeftChild in interface TreeNode
Returns:
the left child, if any, of this node in the parse tree

getRightChild

public abstract TreeNode getRightChild()
Description copied from interface: TreeNode
Returns the right child if it exists or null if it doesn't.

Specified by:
getRightChild in interface TreeNode
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: TreeNode
Generated code for this node and pushes it onto the execution stack.

Specified by:
genCode in interface TreeNode
Parameters:
codeStack - the execution stack to push the generated code for this node.

Cytoscape 3.0.1 API

Copyright 2011 Cytoscape Consortium. All rights reserved.