Class AbstractOperator

    • Constructor Detail

      • AbstractOperator

        protected AbstractOperator()
        Creates a new operator and uses the InfixOperator annotation to create the operator definition.
    • Method Detail

      • getPrecedence

        public int getPrecedence​(ExpressionConfiguration configuration)
        Description copied from interface: OperatorIfc
        Called during parsing, can be implemented to return a customized precedence.
        Specified by:
        getPrecedence in interface OperatorIfc
        Parameters:
        configuration - The expression configuration.
        Returns:
        The default precedence from the operator annotation, or a customized value.
      • isLeftAssociative

        public boolean isLeftAssociative()
        Description copied from interface: OperatorIfc
        If operators with same precedence are evaluated from left to right.
        Specified by:
        isLeftAssociative in interface OperatorIfc
        Returns:
        The associativity.
      • isOperandLazy

        public boolean isOperandLazy()
        Description copied from interface: OperatorIfc
        Checks if the operand is lazy.
        Specified by:
        isOperandLazy in interface OperatorIfc
        Returns:
        true if operands are defined as lazy.
      • isPrefix

        public boolean isPrefix()
        Description copied from interface: OperatorIfc
        If it is a prefix operator.
        Specified by:
        isPrefix in interface OperatorIfc
        Returns:
        true if it is a prefix operator.
      • isPostfix

        public boolean isPostfix()
        Description copied from interface: OperatorIfc
        If it is a postfix operator.
        Specified by:
        isPostfix in interface OperatorIfc
        Returns:
        true if it is a postfix operator.
      • isInfix

        public boolean isInfix()
        Description copied from interface: OperatorIfc
        If it is an infix operator.
        Specified by:
        isInfix in interface OperatorIfc
        Returns:
        true if it is an infix operator.