Class OrExpression

  • All Implemented Interfaces:
    Expression

    public final class OrExpression
    extends LogicalExpression
    The OR logical operator chains multiple criteria together. A valid operand of an OR operator must be one of: TRUE, FALSE, and NULL. The OR operator has a lower precedence than the AND operator.

    NULL represents unknown. Therefore, if one operand is NULL and the other operand is TRUE the result is TRUE, because one TRUE operand is sufficient for a TRUE result. If one operand is NULL and the other operand is either FALSE or NULL, the result is NULL (unknown).

    The following table shows how the OR operator is evaluated based on its two operands:

    TRUEFALSENULL
    TRUETRUETRUETRUE
    FALSETRUEFALSENULL
    NULLTRUENULLNULL
    BNF: conditional_expression ::= conditional_expression OR conditional_term

    Version:
    2.5
    Author:
    Pascal Filion
    Since:
    2.3
    • Constructor Detail

      • OrExpression

        public OrExpression​(AbstractExpression parent)
        Creates a new OrExpression.
        Parameters:
        parent - The parent of this expression