Class ASTOpNode

  • All Implemented Interfaces:
    Node

    public class ASTOpNode
    extends ASTFunNode
    Function Node
    • Constructor Detail

      • ASTOpNode

        public ASTOpNode​(int id)
        Creates a new ASTFunNode
    • Method Detail

      • setOperator

        public void setOperator​(Operator op)
        Sets the opID, name and pfmc for this node by looking up the values in the Operators class
      • toString

        public java.lang.String toString()
        Returns a string containing the function name.
        Overrides:
        toString in class ASTFunNode
      • getName

        public java.lang.String getName()
        Returns the name of the node (operator symbol or function name).
        Specified by:
        getName in interface Node
        Overrides:
        getName in class ASTFunNode
        Returns:
        the name if an ASTVarNode, ASTFunNode, ASTOpNode, null otherwise
      • getOperator

        public Operator getOperator()
        Returns the id number of the operator if the node is an operator.
        Specified by:
        getOperator in interface Node
        Overrides:
        getOperator in class ASTFunNode
        Returns:
        The Operator for ASTOpNodes, null otherwise