Class ChainingArithmeticExpression

    • Constructor Detail

      • ChainingArithmeticExpression

        public ChainingArithmeticExpression​(com.blazebit.domain.runtime.model.DomainType type,
                                            ArithmeticExpression left,
                                            ArithmeticExpression right,
                                            ArithmeticOperatorType operator)
        Creates a new expression from the given operands and the given operator returning a result of the given domain type.
        Parameters:
        type - The result domain type
        left - The left operand
        right - The right operand
        operator - The operator
    • Method Detail

      • getLeft

        public ArithmeticExpression getLeft()
        Returns the left operand.
        Returns:
        the left operand
      • getRight

        public ArithmeticExpression getRight()
        Returns the right operand.
        Returns:
        the right operand
      • getOperator

        public ArithmeticOperatorType getOperator()
        Returns the arithmetic operator.
        Returns:
        the arithmetic operator
      • accept

        public void accept​(Expression.Visitor visitor)
        Dynamic dispatch to one of the visit methods of the visitor, based on the runtime type.
        Specified by:
        accept in interface Expression
        Parameters:
        visitor - The visitor to call visit on
      • accept

        public <T> T accept​(Expression.ResultVisitor<T> visitor)
        Dynamic dispatch to one of the visit methods of the visitor, based on the runtime type.
        Specified by:
        accept in interface Expression
        Type Parameters:
        T - The result type
        Parameters:
        visitor - The visitor to call visit on
        Returns:
        the value as returned by the result visitor