com.singularsys.jep.parser

## Class ASTFunNode

- java.lang.Object
- - com.singularsys.jep.parser.SimpleNode
  - - com.singularsys.jep.parser.ASTFunNode

- All Implemented Interfaces:
    Node
  Direct Known Subclasses:
    ASTOpNode

      public class ASTFunNode
      extends SimpleNode

  Function Node

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.singularsys.jep.parser.Node

      `Node.HookKey`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected PostfixMathCommandI` | `pfmc` The function class used to evaluate the node

    - ### Fields inherited from class com.singularsys.jep.parser.SimpleNode

      `children, id, keys, parent, vals`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ASTFunNode(int id)` Creates a new ASTFunNode

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getName()` Returns the name of the node (operator symbol or function name).
    `Operator` | `getOperator()` Return the operator associated with a Node (if any)
    `PostfixMathCommandI` | `getPFMC()` Returns the math command class associated with this node.
    `java.lang.Object` | `getValue()` Return the value associated with the node (if any).
    `Variable` | `getVar()` Return the variable associated with a Node (if any)
    `java.lang.Object` | `jjtAccept(ParserVisitor visitor, java.lang.Object data)` Accept the visitor.
    `void` | `setFunction(java.lang.String name_in, PostfixMathCommandI pfmc_in)` Sets the function for a node.
    `java.lang.String` | `toString()` Returns a string containing the function name.

    - ### Methods inherited from class com.singularsys.jep.parser.SimpleNode

      `childIterator, children, childrenAccept, dump, getHook, getId, hookKeys, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, removeHook, setHook, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### pfmc

          protected PostfixMathCommandI pfmc

      The function class used to evaluate the node

  - ### Constructor Detail

    - #### ASTFunNode

          public ASTFunNode(int id)

      Creates a new ASTFunNode

  - ### Method Detail

    - #### jjtAccept

          public java.lang.Object jjtAccept(ParserVisitor visitor,
                                            java.lang.Object data)
                                     throws JepException

      Accept the visitor.
      Specified by:
        `jjtAccept` in interface `Node`
      Overrides:
        `jjtAccept` in class `SimpleNode`
      Throws:
        `ParseException`
        `JepException`

    - #### setFunction

          public void setFunction(java.lang.String name_in,
                                  PostfixMathCommandI pfmc_in)

      Sets the function for a node. A name and function class must be specified.

    - #### toString

          public java.lang.String toString()

      Returns a string containing the function name.
      Overrides:
        `toString` in class `java.lang.Object`

    - #### getPFMC

          public PostfixMathCommandI getPFMC()

      Returns the math command class associated with this node.
      Returns:
        the PostfixMathCommand for ASTFunNode and ASTOpNode, null otherwise

    - #### getName

          public java.lang.String getName()

      Returns the name of the node (operator symbol or function name).
      Returns:
        the name if an ASTVarNode, ASTFunNode, ASTOpNode, null otherwise

    - #### getOperator

          public Operator getOperator()

      Description copied from interface: `Node`
      Return the operator associated with a Node (if any)
      Returns:
        The Operator for ASTOpNodes, null otherwise

    - #### getValue

          public java.lang.Object getValue()

      Description copied from interface: `Node`
      Return the value associated with the node (if any).
      Returns:
        the value if an ASTConstant, ASTVarNode, null otherwise

    - #### getVar

          public Variable getVar()

      Description copied from interface: `Node`
      Return the variable associated with a Node (if any)
      Returns:
        The Variable for ASTVarNodes, null otherwise

Copyright © 2018 Singular Systems http://www.singularsys.com/jep