Class JExprMath


public class JExprMath extends JExpr
An class to represent expressions that include an operator (math, logical, etc.).
  • Field Details

  • Constructor Details

    • JExprMath

      public JExprMath()
      Creates a new expression.
    • JExprMath

      public JExprMath(JExprMath.Op anOp, JExpr aFirst)
      Creates a new expression for given op and LeftHand expression.
    • JExprMath

      public JExprMath(JExprMath.Op anOp, JExpr aFirst, JExpr aSecond)
      Creates a new expression for given op and LeftHand/RightHand expressions.
  • Method Details

    • getOp

      public JExprMath.Op getOp()
      Returns the op.
    • getOperandCount

      public int getOperandCount()
      Returns the operand count.
    • getOperand

      public JExpr getOperand(int anIndex)
      Returns the specified operand.
    • setOperand

      public void setOperand(JExpr anExpr, int anIndex)
      Sets the specified operand.
    • getClassNameImpl

      protected String getClassNameImpl()
      Returns the class name for expression.
      Overrides:
      getClassNameImpl in class JNode
    • getNodeString

      public String getNodeString()
      Returns the part name.
      Overrides:
      getNodeString in class JNode
    • buildChildren

      protected void buildChildren()
      Add operands to children.
      Overrides:
      buildChildren in class JNode