Class ArithmeticExpressions
java.lang.Object
io.github.torand.fastersql.expression.arithmetic.ArithmeticExpressions
Provides factory methods for arithmetic expressions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Additionadd(Expression firstTerm, Expression secondTerm) Creates an addition (sum) expression.static Divisiondivide(Expression dividend, Expression divisor) Creates a division (quotient) expression.static Modulomod(Expression dividend, Expression divisor) Creates a modulo (division remainder) expression.static Multiplicationmultiply(Expression firstFactor, Expression secondFactor) Creates a multiplication (product) expression.static Negateneg(Expression expression) Creates a negatation expression.static Subtractionsubtract(Expression minuend, Expression subtrahend) Creates a subtraction (difference) expression.
-
Method Details
-
add
Creates an addition (sum) expression.- Parameters:
firstTerm- the first term.secondTerm- the second term.- Returns:
- the addition expression.
-
subtract
Creates a subtraction (difference) expression.- Parameters:
minuend- the minuend.subtrahend- the subtrahend.- Returns:
- the subtraction expression.
-
multiply
Creates a multiplication (product) expression.- Parameters:
firstFactor- the first factor.secondFactor- the second factor.- Returns:
- the multiplication expression.
-
divide
Creates a division (quotient) expression.- Parameters:
dividend- the dividend.divisor- the divisor.- Returns:
- the division expression.
-
mod
Creates a modulo (division remainder) expression.- Parameters:
dividend- the dividend.divisor- the divisor.- Returns:
- the modulo expression.
-
neg
Creates a negatation expression.- Parameters:
expression- the numeric expression.- Returns:
- the negation expression.
-