Class BinaryOperationNode

All Implemented Interfaces:
Direct Known Subclasses:
BitwiseAndNode, BitwiseOrNode, BitwiseXorNode, ConditionalAndNode, ConditionalOrNode, EqualToNode, FloatingDivisionNode, FloatingRemainderNode, GreaterThanNode, GreaterThanOrEqualNode, IntegerDivisionNode, IntegerRemainderNode, LeftShiftNode, LessThanNode, LessThanOrEqualNode, NotEqualNode, NumericalAdditionNode, NumericalMultiplicationNode, NumericalSubtractionNode, SignedRightShiftNode, StringConcatenateNode, UnsignedRightShiftNode

public abstract class BinaryOperationNode extends Node
A node for a binary expression.

For example:

   lefOperandNode operator rightOperandNode
  • Field Details

    • tree

      protected final BinaryTree tree
    • left

      protected final Node left
  • Constructor Details

    • BinaryOperationNode

      protected BinaryOperationNode(BinaryTree tree, Node left, Node right)
  • Method Details

    • getLeftOperand

      public Node getLeftOperand()
    • getRightOperand

      public Node getRightOperand()
    • getTree

      public BinaryTree getTree()
      Description copied from class: Node
      Returns the Tree in the abstract syntax tree, or null if no corresponding tree exists. For instance, this is the case for an ImplicitThisNode.
      Specified by:
      getTree in class Node
      the corresponding Tree or null
    • getOperands

      @SideEffectFree public Collection<Node> getOperands()
      Description copied from class: Node
      Returns a collection containing all of the operand Nodes of this Node.
      Specified by:
      getOperands in class Node
      a collection containing all of the operand Nodes of this Node