Class ArithmeticOperators
java.lang.Object
org.springframework.data.mongodb.core.aggregation.ArithmeticOperators
Gateway to Arithmetic aggregation operations that perform math operations on numbers.
- Since:
- 1.10
- Author:
- Christoph Strobl, Mark Paluch, Mushtaq Ahmed
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
AggregationExpression
for$abs
.static class
Anexpression
that calculates the inverse cosine of a value.static class
Anexpression
that calculates the inverse hyperbolic cosine of a value.static class
AggregationExpression
for$add
.static enum
The unit of measure for computations that operate upon angles.static class
static class
Anexpression
that calculates the inverse sine of a value.static class
Anexpression
that calculates the inverse hyperbolic sine of a valuestatic class
Anexpression
that calculates the inverse tangent of a value.static class
Anexpression
that calculates the inverse tangent of y / x, where y and x are the first and second values passed to the expression respectively.static class
Anexpression
that calculates the inverse hyperbolic tangent of a valuestatic class
AggregationExpression
for$ceil
.static class
Anexpression
that calculates the cosine of a value that is measured in radians.static class
Anexpression
that calculates the hyperbolic cosine of a value that is measured inArithmeticOperators.AngularUnit.RADIANS
.static class
Value object to represent anexpression
that calculates the average rate of change within the specified window.static class
AggregationExpression
for$divide
.static class
AggregationExpression
for$exp
.static class
AggregationExpression
for$floor
.static class
Value object to represent anexpression
that calculates the approximation for the mathematical integral value.static class
AggregationExpression
for$ln
.static class
AggregationExpression
for$log
.static class
AggregationExpression
for$log10
.static class
AggregationExpression
for$mod
.static class
AggregationExpression
for$multiply
.static class
AggregationExpression
for$pow
.static class
ArithmeticOperators.Rand
returns a floating value between 0 and 1.static class
ArithmeticOperators.Round
rounds a number to a whole integer or to a specified decimal place.static class
Anexpression
that calculates the sine of a value that is measured in radians.static class
Anexpression
that calculates the hyperbolic sine of a value that is measured inArithmeticOperators.AngularUnit.RADIANS
.static class
AggregationExpression
for$sqrt
.static class
AggregationExpression
for$subtract
.static class
Anexpression
that calculates the tangent of a value that is measured in radians.static class
Anexpression
that calculates the hyperbolic tangent of a value that is measured inArithmeticOperators.AngularUnit.RADIANS
.static class
AggregationExpression
for$trunc
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ArithmeticOperators.Rand
rand()
Creates newAggregationExpression
that returns a random float between0
and1
each time it is called.Take the field referenced by given fieldReference.valueOf
(AggregationExpression expression) Take the value resulting from the givenAggregationExpression
.
-
Constructor Details
-
ArithmeticOperators
public ArithmeticOperators()
-
-
Method Details
-
valueOf
Take the field referenced by given fieldReference.- Parameters:
fieldReference
- must not be null.- Returns:
- new instance of
ArithmeticOperators.ArithmeticOperatorFactory
.
-
valueOf
public static ArithmeticOperators.ArithmeticOperatorFactory valueOf(AggregationExpression expression) Take the value resulting from the givenAggregationExpression
.- Parameters:
expression
- must not be null.- Returns:
- new instance of
ArithmeticOperators.ArithmeticOperatorFactory
.
-
rand
Creates newAggregationExpression
that returns a random float between0
and1
each time it is called.- Returns:
- new instance of
ArithmeticOperators.Rand
. - Since:
- 3.3
-