Class BooleanExpressions
java.lang.Object
dev.morphia.aggregation.expressions.BooleanExpressions
Defines helper methods for the boolean expressions
- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic LogicalExpression
and()
Evaluates one or more values and returns true if all the values are true or if evoked with no argument expressions.static LogicalExpression
Evaluates one or more values and returns true if all the values are true or if evoked with no argument expressions.static Expression
Evaluates a boolean and returns the opposite boolean value; i.e.static LogicalExpression
or()
Evaluates one or more values and returns true if any of the values are true.static LogicalExpression
Evaluates one or more values and returns true if any of the values are true.
-
Method Details
-
and
Evaluates one or more values and returns true if all the values are true or if evoked with no argument expressions. Otherwise, $and returns false.- Parameters:
first
- the first valueadditional
- any additional values- Returns:
- the new expression
- MongoDB documentation
- Aggregration Expression: $and
-
and
Evaluates one or more values and returns true if all the values are true or if evoked with no argument expressions. Otherwise, $and returns false.- Returns:
- the new expression
- Since:
- 2.3
- MongoDB documentation
- Aggregration Expression: $and
-
not
Evaluates a boolean and returns the opposite boolean value; i.e. when passed an expression that evaluates to true, $not returns false; when passed an expression that evaluates to false, $not returns true.- Parameters:
value
- the expression- Returns:
- the new expression
- MongoDB documentation
- Aggregration Expression: $not
-
or
Evaluates one or more values and returns true if any of the values are true. Otherwise, $or returns false.- Parameters:
first
- the first valueadditional
- any additional values- Returns:
- the new expression
- MongoDB documentation
- Aggregration Expression: $or
-
or
Evaluates one or more values and returns true if any of the values are true. Otherwise, $or returns false.- Returns:
- the new expression
- Since:
- 2.3
- MongoDB documentation
- Aggregration Expression: $or
-