Module spring.data.mongodb
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, Julia Lee
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAggregationExpressionfor$abs.static classAnexpressionthat calculates the inverse cosine of a value.static classAnexpressionthat calculates the inverse hyperbolic cosine of a value.static classAggregationExpressionfor$add.static enumThe unit of measure for computations that operate upon angles.static classstatic classAnexpressionthat calculates the inverse sine of a value.static classAnexpressionthat calculates the inverse hyperbolic sine of a valuestatic classAnexpressionthat calculates the inverse tangent of a value.static classAnexpressionthat calculates the inverse tangent of y / x, where y and x are the first and second values passed to the expression respectively.static classAnexpressionthat calculates the inverse hyperbolic tangent of a valuestatic classAggregationExpressionfor$ceil.static classAnexpressionthat calculates the cosine of a value that is measured in radians.static classAnexpressionthat calculates the hyperbolic cosine of a value that is measured inArithmeticOperators.AngularUnit.RADIANS.static classValue object to represent anexpressionthat calculates the average rate of change within the specified window.static classAggregationExpressionfor$divide.static classAggregationExpressionfor$exp.static classAggregationExpressionfor$floor.static classValue object to represent anexpressionthat calculates the approximation for the mathematical integral value.static classAggregationExpressionfor$ln.static classAggregationExpressionfor$log.static classAggregationExpressionfor$log10.static classAggregationExpressionfor$mod.static classAggregationExpressionfor$multiply.static classAggregationExpressionfor$pow.static classArithmeticOperators.Randreturns a floating value between 0 and 1.static classArithmeticOperators.Roundrounds a number to a whole integer or to a specified decimal place.static classAnexpressionthat calculates the sine of a value that is measured in radians.static classAnexpressionthat calculates the hyperbolic sine of a value that is measured inArithmeticOperators.AngularUnit.RADIANS.static classAggregationExpressionfor$sqrt.static classAggregationExpressionfor$subtract.static classAnexpressionthat calculates the tangent of a value that is measured in radians.static classAnexpressionthat calculates the hyperbolic tangent of a value that is measured inArithmeticOperators.AngularUnit.RADIANS.static classAggregationExpressionfor$trunc. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ArithmeticOperators.Randrand()Creates newAggregationExpressionthat returns a random float between0and1each 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 newAggregationExpressionthat returns a random float between0and1each time it is called.- Returns:
- new instance of
ArithmeticOperators.Rand. - Since:
- 3.3
-