Interface CqnExpression

    • Method Detail

      • isExpression

        default boolean isExpression()
        Description copied from interface: CqnValue
        Returns true if this is a CqnExpression.
        Specified by:
        isExpression in interface CqnValue
        Returns:
        true if this is an expression, otherwise false
      • asExpression

        default CqnExpression asExpression()
        Description copied from interface: CqnValue
        Casts this value to CqnExpression.
        Specified by:
        asExpression in interface CqnValue
        Returns:
        this value as an expression
      • isArithmeticExpression

        default boolean isArithmeticExpression()
        Returns true if this is a CqnArithmeticExpression.
        Returns:
        true if this is an arithmetic expression, otherwise false
      • asArithmeticExpression

        default CqnArithmeticExpression asArithmeticExpression()
        Casts this expression to a CqnArithmeticExpression.
        Returns:
        this as an arithmetic expression
        Throws:
        ClassCastException - if this expression is not an arithmetic expression
      • isNegation

        default boolean isNegation()
        Returns true if this is a CqnArithmeticNegation.
        Returns:
        true if this is a negation expression, otherwise false
      • asNegation

        default CqnArithmeticNegation asNegation()
        Casts this expression to a CqnArithmeticNegation.
        Returns:
        this as a negation expression
        Throws:
        ClassCastException - if this expression is not an arithmetic negation
      • isPredicate

        default boolean isPredicate()
        Returns true if this is a CqnPredicate.
        Returns:
        true if this is a predicate, otherwise false
      • asPredicate

        default CqnPredicate asPredicate()
        Casts this expression to a CqnPredicate.
        Returns:
        this as a predicate
        Throws:
        ClassCastException - if this expression is not a predicate
      • accept

        default void accept​(CqnVisitor visitor)
        Description copied from interface: CqnToken
        Traverses the expression tree represented by this token with a given visitor. The traversal order is depth-first. If this token has child nodes they are traversed first by dispatching the visitor to the children's accept methods. Afterwards this token is passed to the visitor's visit method specific for this token's type.
        Specified by:
        accept in interface CqnToken
        Parameters:
        visitor - the CqnVisitor