Class JExprMath


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

      • 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 Detail

      • 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 java.lang.String getClassNameImpl()
        Returns the class name for expression.
        Overrides:
        getClassNameImpl in class JNode
      • getNodeString

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

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