Interface ArithmeticExpr

All Superinterfaces:
Expr, ODataExpr
All Known Implementing Classes:
MemberExpr, MethodCallExpr, NumericValueExpr, SimpleArithmeticExpr

public interface ArithmeticExpr extends Expr
Interface to denote that Expression can possibly be used in arithmetic operations. Does not guarantee that the result will be semantically correct!
  • Method Details

    • isArithmetic

      default boolean isArithmetic()
      Description copied from interface: Expr
      Check if this expression is a arithmetic expresion.
      Specified by:
      isArithmetic in interface Expr
      Returns:
      if it is a arithmetic expression
    • asArithmetic

      default Optional<ArithmeticExpr> asArithmetic()
      Description copied from interface: Expr
      Get this expression as a arithmetic expression
      Specified by:
      asArithmetic in interface Expr
      Returns:
      the expression or Optional.empty() if the type does not match