Class BooleanExpressions
- java.lang.Object
-
- dev.morphia.aggregation.experimental.expressions.BooleanExpressions
-
public final class BooleanExpressions extends Object
Defines helper methods for the boolean expressions- Since:
- 2.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Expression
and(Expression first, Expression... additional)
Evaluates one or more expressions and returns true if all of the expressions are true or if evoked with no argument expressions.static Expression
not(Expression value)
Evaluates a boolean and returns the opposite boolean value; i.e.static Expression
or(Expression first, Expression... additional)
Evaluates one or more expressions and returns true if any of the expressions are true.
-
-
-
Method Detail
-
and
public static Expression and(Expression first, Expression... additional)
Evaluates one or more expressions and returns true if all of the expressions are true or if evoked with no argument expressions. Otherwise, $and returns false.- Parameters:
first
- the first expressionadditional
- any additional expressions- Returns:
- the new expression
- MongoDB documentation
- Aggregration Expression: $and
-
not
public static Expression not(Expression value)
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
public static Expression or(Expression first, Expression... additional)
Evaluates one or more expressions and returns true if any of the expressions are true. Otherwise, $or returns false.- Parameters:
first
- the first expressionadditional
- any additional expressions- Returns:
- the new expression
- MongoDB documentation
- Aggregration Expression: $or
-
-