Class ArithmeticExpressions

java.lang.Object
io.github.torand.fastersql.expression.arithmetic.ArithmeticExpressions

public final class ArithmeticExpressions extends Object
Provides factory methods for arithmetic expressions.
  • Method Details

    • add

      public static Addition add(Expression firstTerm, Expression secondTerm)
      Creates an addition (sum) expression.
      Parameters:
      firstTerm - the first term.
      secondTerm - the second term.
      Returns:
      the addition expression.
    • subtract

      public static Subtraction subtract(Expression minuend, Expression subtrahend)
      Creates a subtraction (difference) expression.
      Parameters:
      minuend - the minuend.
      subtrahend - the subtrahend.
      Returns:
      the subtraction expression.
    • multiply

      public static Multiplication multiply(Expression firstFactor, Expression secondFactor)
      Creates a multiplication (product) expression.
      Parameters:
      firstFactor - the first factor.
      secondFactor - the second factor.
      Returns:
      the multiplication expression.
    • divide

      public static Division divide(Expression dividend, Expression divisor)
      Creates a division (quotient) expression.
      Parameters:
      dividend - the dividend.
      divisor - the divisor.
      Returns:
      the division expression.
    • mod

      public static Modulo mod(Expression dividend, Expression divisor)
      Creates a modulo (division remainder) expression.
      Parameters:
      dividend - the dividend.
      divisor - the divisor.
      Returns:
      the modulo expression.