Class ArithmeticOperators.ArithmeticOperatorFactory
java.lang.Object
org.springframework.data.mongodb.core.aggregation.ArithmeticOperators.ArithmeticOperatorFactory
- Enclosing class:
- ArithmeticOperators
- Author:
- Christoph Strobl
-
Constructor Summary
ConstructorsConstructorDescriptionArithmeticOperatorFactory
(String fieldReference) Creates newArithmeticOperators.ArithmeticOperatorFactory
for given fieldReference.ArithmeticOperatorFactory
(AggregationExpression expression) Creates newArithmeticOperators.ArithmeticOperatorFactory
for givenAggregationExpression
. -
Method Summary
Modifier and TypeMethodDescriptionabs()
Creates newAggregationExpression
that returns the absolute value of the associated number.acos()
Creates newAggregationExpression
that calculates the inverse cosine of a numeric value.acosh()
Creates newAggregationExpression
that calculates the inverse hyperbolic cosine of a numeric value.Creates newAggregationExpression
that adds the given value to the associated number.Creates newAggregationExpression
that adds the value of fieldReference to the associated number.add
(AggregationExpression expression) Creates newAggregationExpression
that adds the resulting value of the givenAggregationExpression
to the associated number.asin()
Creates newAggregationExpression
that calculates the inverse sine of a numeric value.asinh()
Creates newAggregationExpression
that calculates the inverse hyperbolic sine of a numeric value.atan()
Creates newAggregationExpression
that calculates the inverse tangent of a numeric value.Creates newAggregationExpression
that calculates the inverse tangent of the the numeric value divided by the given numeric value in the argument.Creates newAggregationExpression
that calculates the inverse tangent of the the numeric value divided by the given field reference in the argument.atan2
(AggregationExpression expression) Creates newAggregationExpression
that calculates the inverse tangent of the the numeric value divided by the givenAggregationExpression
in the argument.atanh()
Creates newAggregationExpression
that calculates the inverse hyperbolic tangent of a numeric value.avg()
Creates newAggregationExpression
that returns the average value of the numeric values.ceil()
Creates newAggregationExpression
that returns the smallest integer greater than or equal to the assoicated number.cos()
Creates newAggregationExpression
that calculates the cosine of a numeric value given inradians
.Creates newAggregationExpression
that calculates the cosine of a numeric value in the givenunit
.cosh()
Creates newAggregationExpression
that calculates the hyperbolic cosine of a numeric value given inradians
.Creates newAggregationExpression
that calculates the hyperbolic cosine of a numeric value.covariancePop
(String fieldReference) Creates newAggregationExpression
that uses the previous input (field/expression) and the value of the given field to calculate the population covariance of the two.covariancePop
(AggregationExpression expression) Creates newAggregationExpression
that uses the previous input (field/expression) and the result of the givenexpression
to calculate the population covariance of the two.covarianceSamp
(String fieldReference) Creates newAggregationExpression
that uses the previous input (field/expression) and the value of the given field to calculate the sample covariance of the two.covarianceSamp
(AggregationExpression expression) Creates newAggregationExpression
that uses the previous input (field/expression) and the result of the givenexpression
to calculate the sample covariance of the two.Creates newAggregationExpression
that calculates the mathematical derivative value.derivative
(String unit) Creates newAggregationExpression
that calculates the mathematical derivative value.Creates newAggregationExpression
that calculates the mathematical derivative value.Creates newAggregationExpression
that divides the associated number by given value.Creates newAggregationExpression
that ivides the associated number by number referenced via fieldReference.divideBy
(AggregationExpression expression) Creates newAggregationExpression
that divides the associated number by number extracted via expression.exp()
Creates newAggregationExpression
that raises Euler’s number (i.e. e ) on the associated number.floor()
Creates newAggregationExpression
that returns the largest integer less than or equal to the associated number.integral()
Creates newAggregationExpression
that calculates the approximation for the mathematical integral value.Creates newAggregationExpression
that calculates the approximation for the mathematical integral value.Creates newAggregationExpression
that calculates the approximation for the mathematical integral value.ln()
Creates newAggregationExpression
that calculates the natural logarithm ln (i.e loge) of the assoicated number.Creates newAggregationExpression
that calculates the log of a the associated number in the specified base.Creates newAggregationExpression
that calculates the log of the associated number in the specified base referenced via fieldReference.log
(AggregationExpression expression) Creates newAggregationExpression
that calculates the log of the associated number in the specified base extracted by givenAggregationExpression
.log10()
Creates newAggregationExpression
that calculates the log base 10 for the associated number.max()
Creates newAggregationExpression
that returns the maximum value.min()
Creates newAggregationExpression
that returns the minimum value.Creates newAggregationExpression
that divides the associated number by another and returns the remainder.Creates newAggregationExpression
that divides the associated number by another and returns the remainder.mod
(AggregationExpression expression) Creates newAggregationExpression
that divides the associated number by another and returns the remainder.multiplyBy
(Number value) Creates newAggregationExpression
that multiplies the associated number with another.multiplyBy
(String fieldReference) Creates newAggregationExpression
that multiplies the associated number with another.multiplyBy
(AggregationExpression expression) Creates newAggregationExpression
that multiplies the associated number with another.Creates newAggregationExpression
that raises the associated number to the specified exponent.Creates newAggregationExpression
that raises the associated number to the specified exponent.pow
(AggregationExpression expression) Creates newAggregationExpression
that raises the associated number to the specified exponent.round()
Creates newAggregationExpression
that rounds a number to a whole integer or to a specified decimal place.roundToPlace
(int place) Creates newAggregationExpression
that rounds a number to a specified decimal place.sin()
Creates newAggregationExpression
that calculates the sine of a numeric value given inradians
.Creates newAggregationExpression
that calculates the sine of a numeric value in the givenunit
.sinh()
Creates newAggregationExpression
that calculates the sine of a numeric value given inradians
.Creates newAggregationExpression
that calculates the sine of a numeric value.sqrt()
Creates newAggregationExpression
that calculates the square root of the associated number.Creates newAggregationExpression
that calculates the population standard deviation of the input values.Creates newAggregationExpression
that calculates the sample standard deviation of the input values.Creates newAggregationExpression
that subtracts value from the associated number.Creates newAggregationExpression
that subtracts value of given from the associated number.subtract
(AggregationExpression expression) Creates newAggregationExpression
that subtracts value of given from the associated number.sum()
Creates newAggregationExpression
that calculates and returns the sum of numeric values.tan()
Creates newAggregationExpression
that calculates the tangent of a numeric value given inradians
.Creates newAggregationExpression
that calculates the tangent of a numeric value in the givenunit
.tanh()
Creates newAggregationExpression
that calculates the hyperbolic tangent of a numeric value given inradians
.Creates newAggregationExpression
that calculates the hyperbolic tangent of a numeric value.trunc()
Creates newAggregationExpression
that truncates a number to its integer.
-
Constructor Details
-
ArithmeticOperatorFactory
Creates newArithmeticOperators.ArithmeticOperatorFactory
for given fieldReference.- Parameters:
fieldReference
- must not be null.
-
ArithmeticOperatorFactory
Creates newArithmeticOperators.ArithmeticOperatorFactory
for givenAggregationExpression
.- Parameters:
expression
- must not be null.
-
-
Method Details
-
abs
Creates newAggregationExpression
that returns the absolute value of the associated number.- Returns:
- new instance of
ArithmeticOperators.Abs
.
-
add
Creates newAggregationExpression
that adds the value of fieldReference to the associated number.- Parameters:
fieldReference
- must not be null.- Returns:
- new instance of
ArithmeticOperators.Add
.
-
add
Creates newAggregationExpression
that adds the resulting value of the givenAggregationExpression
to the associated number.- Parameters:
expression
- must not be null.- Returns:
- new instance of
ArithmeticOperators.Add
.
-
add
Creates newAggregationExpression
that adds the given value to the associated number.- Parameters:
value
- must not be null.- Returns:
- new instance of
ArithmeticOperators.Add
.
-
ceil
Creates newAggregationExpression
that returns the smallest integer greater than or equal to the assoicated number.- Returns:
- new instance of
ArithmeticOperators.Ceil
.
-
derivative
Creates newAggregationExpression
that calculates the mathematical derivative value.- Returns:
- new instance of
ArithmeticOperators.Derivative
. - Since:
- 3.3
-
derivative
Creates newAggregationExpression
that calculates the mathematical derivative value.- Parameters:
unit
- The time unit (SetWindowFieldsOperation.WindowUnits.WEEK
,SetWindowFieldsOperation.WindowUnits.DAY
,SetWindowFieldsOperation.WindowUnits.HOUR
,SetWindowFieldsOperation.WindowUnits.MINUTE
,SetWindowFieldsOperation.WindowUnits.SECOND
,SetWindowFieldsOperation.WindowUnits.MILLISECOND
) to apply.- Returns:
- new instance of
ArithmeticOperators.Derivative
. - Since:
- 3.3
-
derivative
Creates newAggregationExpression
that calculates the mathematical derivative value.- Parameters:
unit
- The time unit (week, day, hour, minute, second, millisecond) to apply can be null.- Returns:
- new instance of
ArithmeticOperators.Derivative
. - Since:
- 3.3
-
divideBy
Creates newAggregationExpression
that ivides the associated number by number referenced via fieldReference.- Parameters:
fieldReference
- must not be null.- Returns:
- new instance of
ArithmeticOperators.Divide
.
-
divideBy
Creates newAggregationExpression
that divides the associated number by number extracted via expression.- Parameters:
expression
- must not be null.- Returns:
- new instance of
ArithmeticOperators.Divide
.
-
divideBy
Creates newAggregationExpression
that divides the associated number by given value.- Parameters:
value
- must not be null.- Returns:
- new instance of
ArithmeticOperators.Divide
.
-
exp
Creates newAggregationExpression
that raises Euler’s number (i.e. e ) on the associated number.- Returns:
- new instance of
ArithmeticOperators.Exp
.
-
floor
Creates newAggregationExpression
that returns the largest integer less than or equal to the associated number.- Returns:
- new instance of
ArithmeticOperators.Floor
.
-
integral
Creates newAggregationExpression
that calculates the approximation for the mathematical integral value.- Returns:
- new instance of
ArithmeticOperators.Integral
. - Since:
- 3.3
-
integral
Creates newAggregationExpression
that calculates the approximation for the mathematical integral value.- Parameters:
unit
- The time unit (SetWindowFieldsOperation.WindowUnits.WEEK
,SetWindowFieldsOperation.WindowUnits.DAY
,SetWindowFieldsOperation.WindowUnits.HOUR
,SetWindowFieldsOperation.WindowUnits.MINUTE
,SetWindowFieldsOperation.WindowUnits.SECOND
,SetWindowFieldsOperation.WindowUnits.MILLISECOND
) to apply.- Returns:
- new instance of
ArithmeticOperators.Derivative
. - Since:
- 3.3
-
integral
Creates newAggregationExpression
that calculates the approximation for the mathematical integral value.- Parameters:
unit
- the unit of measure.- Returns:
- new instance of
ArithmeticOperators.Integral
. - Since:
- 3.3
-
ln
Creates newAggregationExpression
that calculates the natural logarithm ln (i.e loge) of the assoicated number.- Returns:
- new instance of
ArithmeticOperators.Ln
.
-
log
Creates newAggregationExpression
that calculates the log of the associated number in the specified base referenced via fieldReference.- Parameters:
fieldReference
- must not be null.- Returns:
- new instance of
ArithmeticOperators.Log
.
-
log
Creates newAggregationExpression
that calculates the log of the associated number in the specified base extracted by givenAggregationExpression
.- Parameters:
expression
- must not be null.- Returns:
- new instance of
ArithmeticOperators.Log
.
-
log
Creates newAggregationExpression
that calculates the log of a the associated number in the specified base.- Parameters:
base
- must not be null.- Returns:
- new instance of
ArithmeticOperators.Log
.
-
log10
Creates newAggregationExpression
that calculates the log base 10 for the associated number.- Returns:
- new instance of
ArithmeticOperators.Log10
.
-
mod
Creates newAggregationExpression
that divides the associated number by another and returns the remainder.- Parameters:
fieldReference
- must not be null.- Returns:
- new instance of
ArithmeticOperators.Mod
.
-
mod
Creates newAggregationExpression
that divides the associated number by another and returns the remainder.- Parameters:
expression
- must not be null.- Returns:
- new instance of
ArithmeticOperators.Mod
.
-
mod
Creates newAggregationExpression
that divides the associated number by another and returns the remainder.- Parameters:
value
- must not be null.- Returns:
- new instance of
ArithmeticOperators.Mod
.
-
multiplyBy
Creates newAggregationExpression
that multiplies the associated number with another.- Parameters:
fieldReference
- must not be null.- Returns:
- new instance of
ArithmeticOperators.Multiply
.
-
multiplyBy
Creates newAggregationExpression
that multiplies the associated number with another.- Parameters:
expression
- must not be null.- Returns:
- new instance of
ArithmeticOperators.Multiply
.
-
multiplyBy
Creates newAggregationExpression
that multiplies the associated number with another.- Parameters:
value
- must not be null.- Returns:
- new instance of
ArithmeticOperators.Multiply
.
-
pow
Creates newAggregationExpression
that raises the associated number to the specified exponent.- Parameters:
fieldReference
- must not be null.- Returns:
- new instance of
ArithmeticOperators.Pow
.
-
pow
Creates newAggregationExpression
that raises the associated number to the specified exponent.- Parameters:
expression
- must not be null.- Returns:
- new instance of
ArithmeticOperators.Pow
.
-
pow
Creates newAggregationExpression
that raises the associated number to the specified exponent.- Parameters:
value
- must not be null.- Returns:
- new instance of
ArithmeticOperators.Pow
.
-
sqrt
Creates newAggregationExpression
that calculates the square root of the associated number.- Returns:
- new instance of
ArithmeticOperators.Sqrt
.
-
subtract
Creates newAggregationExpression
that subtracts value of given from the associated number.- Parameters:
fieldReference
- must not be null.- Returns:
- new instance of
ArithmeticOperators.Subtract
.
-
subtract
Creates newAggregationExpression
that subtracts value of given from the associated number.- Parameters:
expression
- must not be null.- Returns:
- new instance of
ArithmeticOperators.Subtract
.
-
subtract
Creates newAggregationExpression
that subtracts value from the associated number.- Parameters:
value
- must not be null.- Returns:
- new instance of
ArithmeticOperators.Subtract
.
-
trunc
Creates newAggregationExpression
that truncates a number to its integer.- Returns:
- new instance of
ArithmeticOperators.Trunc
.
-
sum
Creates newAggregationExpression
that calculates and returns the sum of numeric values.- Returns:
- new instance of
AccumulatorOperators.Sum
.
-
avg
Creates newAggregationExpression
that returns the average value of the numeric values.- Returns:
- new instance of
AccumulatorOperators.Avg
.
-
max
Creates newAggregationExpression
that returns the maximum value.- Returns:
- new instance of
AccumulatorOperators.Max
.
-
min
Creates newAggregationExpression
that returns the minimum value.- Returns:
- new instance of
AccumulatorOperators.Min
.
-
stdDevPop
Creates newAggregationExpression
that calculates the population standard deviation of the input values.- Returns:
- new instance of
AccumulatorOperators.StdDevPop
.
-
stdDevSamp
Creates newAggregationExpression
that calculates the sample standard deviation of the input values.- Returns:
- new instance of
AccumulatorOperators.StdDevSamp
.
-
covariancePop
Creates newAggregationExpression
that uses the previous input (field/expression) and the value of the given field to calculate the population covariance of the two.- Parameters:
fieldReference
- must not be null.- Returns:
- new instance of
AccumulatorOperators.CovariancePop
. - Since:
- 3.3
-
covariancePop
Creates newAggregationExpression
that uses the previous input (field/expression) and the result of the givenexpression
to calculate the population covariance of the two.- Parameters:
expression
- must not be null.- Returns:
- new instance of
AccumulatorOperators.CovariancePop
. - Since:
- 3.3
-
covarianceSamp
Creates newAggregationExpression
that uses the previous input (field/expression) and the value of the given field to calculate the sample covariance of the two.- Parameters:
fieldReference
- must not be null.- Returns:
- new instance of
AccumulatorOperators.CovariancePop
. - Since:
- 3.3
-
covarianceSamp
Creates newAggregationExpression
that uses the previous input (field/expression) and the result of the givenexpression
to calculate the sample covariance of the two.- Parameters:
expression
- must not be null.- Returns:
- new instance of
AccumulatorOperators.CovariancePop
. - Since:
- 3.3
-
round
Creates newAggregationExpression
that rounds a number to a whole integer or to a specified decimal place.- Returns:
- new instance of
ArithmeticOperators.Round
. - Since:
- 3.0
-
roundToPlace
Creates newAggregationExpression
that rounds a number to a specified decimal place.- Returns:
- new instance of
ArithmeticOperators.Round
. - Since:
- 3.0
-
sin
Creates newAggregationExpression
that calculates the sine of a numeric value given inradians
.- Returns:
- new instance of
ArithmeticOperators.Sin
. - Since:
- 3.3
-
sin
Creates newAggregationExpression
that calculates the sine of a numeric value in the givenunit
.- Parameters:
unit
- the unit of measure.- Returns:
- new instance of
ArithmeticOperators.Sin
. - Since:
- 3.3
-
sinh
Creates newAggregationExpression
that calculates the sine of a numeric value given inradians
.- Returns:
- new instance of
ArithmeticOperators.Sinh
. - Since:
- 3.3
-
sinh
Creates newAggregationExpression
that calculates the sine of a numeric value.- Parameters:
unit
- the unit of measure.- Returns:
- new instance of
ArithmeticOperators.Sinh
. - Since:
- 3.3
-
asin
Creates newAggregationExpression
that calculates the inverse sine of a numeric value.- Returns:
- new instance of
ArithmeticOperators.ASin
. - Since:
- 3.3
-
asinh
Creates newAggregationExpression
that calculates the inverse hyperbolic sine of a numeric value.- Returns:
- new instance of
ArithmeticOperators.ASinh
. - Since:
- 3.3
-
cos
Creates newAggregationExpression
that calculates the cosine of a numeric value given inradians
.- Returns:
- new instance of
ArithmeticOperators.Cos
. - Since:
- 3.3
-
cos
Creates newAggregationExpression
that calculates the cosine of a numeric value in the givenunit
.- Parameters:
unit
- the unit of measure.- Returns:
- new instance of
ArithmeticOperators.Cos
. - Since:
- 3.3
-
cosh
Creates newAggregationExpression
that calculates the hyperbolic cosine of a numeric value given inradians
.- Returns:
- new instance of
ArithmeticOperators.Cosh
. - Since:
- 3.3
-
cosh
Creates newAggregationExpression
that calculates the hyperbolic cosine of a numeric value.- Parameters:
unit
- the unit of measure.- Returns:
- new instance of
ArithmeticOperators.Cosh
. - Since:
- 3.3
-
acos
Creates newAggregationExpression
that calculates the inverse cosine of a numeric value.- Returns:
- new instance of
ArithmeticOperators.ACos
. - Since:
- 3.4
-
acosh
Creates newAggregationExpression
that calculates the inverse hyperbolic cosine of a numeric value.- Returns:
- new instance of
ArithmeticOperators.ACosh
. - Since:
- 3.4
-
tan
Creates newAggregationExpression
that calculates the tangent of a numeric value given inradians
.- Returns:
- new instance of
ArithmeticOperators.Tan
. - Since:
- 3.3
-
atan
Creates newAggregationExpression
that calculates the inverse tangent of a numeric value.- Returns:
- new instance of
ArithmeticOperators.ATan
. - Since:
- 3.3
-
atan2
Creates newAggregationExpression
that calculates the inverse tangent of the the numeric value divided by the given numeric value in the argument.- Parameters:
value
- the numeric value- Returns:
- new instance of
ArithmeticOperators.ATan2
. - Since:
- 3.3
-
atan2
Creates newAggregationExpression
that calculates the inverse tangent of the the numeric value divided by the given field reference in the argument.- Parameters:
fieldReference
- the numeric value- Returns:
- new instance of
ArithmeticOperators.ATan2
. - Since:
- 3.3
-
atan2
Creates newAggregationExpression
that calculates the inverse tangent of the the numeric value divided by the givenAggregationExpression
in the argument.- Parameters:
expression
- the expression evaluating to a numeric value- Returns:
- new instance of
ArithmeticOperators.ATan2
. - Since:
- 3.3
-
atanh
Creates newAggregationExpression
that calculates the inverse hyperbolic tangent of a numeric value.- Returns:
- new instance of
ArithmeticOperators.ATanh
. - Since:
- 3.3
-
tan
Creates newAggregationExpression
that calculates the tangent of a numeric value in the givenunit
.- Parameters:
unit
- the unit of measure.- Returns:
- new instance of
ArithmeticOperators.Tan
. - Since:
- 3.3
-
tanh
Creates newAggregationExpression
that calculates the hyperbolic tangent of a numeric value given inradians
.- Returns:
- new instance of
ArithmeticOperators.Tan
. - Since:
- 3.3
-
tanh
Creates newAggregationExpression
that calculates the hyperbolic tangent of a numeric value.- Parameters:
unit
- the unit of measure.- Returns:
- new instance of
ArithmeticOperators.Tanh
. - Since:
- 3.3
-