Interface Expression

All Superinterfaces:
Serializable
All Known Implementing Classes:
Aggregate, And, BoundAggregate, BoundLiteralPredicate, BoundPredicate, BoundSetPredicate, BoundUnaryPredicate, CountAggregate, CountNonNull, CountStar, False, MaxAggregate, MinAggregate, Not, Or, Predicate, True, UnboundAggregate, UnboundPredicate

public interface Expression extends Serializable
Represents a boolean expression tree.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Returns whether this expression will accept the same values as another.
    default Expression
    Returns the negation of this expression, equivalent to not(this).
    op()
    Returns the operation for an expression node.
  • Method Details

    • op

      Returns the operation for an expression node.
    • negate

      default Expression negate()
      Returns the negation of this expression, equivalent to not(this).
    • isEquivalentTo

      default boolean isEquivalentTo(Expression other)
      Returns whether this expression will accept the same values as another.

      If this returns true, the expressions are guaranteed to return the same evaluation for the same input. However, if this returns false the expressions may return the same evaluation for the same input. That is, expressions may be equivalent even if this returns false.

      For best results, rewrite not and bind expressions before calling this method.

      Parameters:
      other - another expression
      Returns:
      true if the expressions are equivalent