Package com.mongodb.client.model.mql
Interface MqlBoolean
- All Superinterfaces:
MqlValue
A boolean value in the context of the
MongoDB Query Language (MQL).
- Since:
- 4.9.0
-
Method Summary
Modifier and TypeMethodDescriptionand
(MqlBoolean other) The logical disjunction ofthis
and theother
value.<T extends MqlValue>
Tcond
(T ifTrue, T ifFalse) TheifTrue
value whenthis
is true, and theifFalse
value otherwise.not()
The logical negation ofthis
value.or
(MqlBoolean other) The logical conjunction ofthis
and theother
value.<R extends MqlValue>
RpassBooleanTo
(Function<? super MqlBoolean, ? extends R> f) The result of passingthis
value to the provided function.<R extends MqlValue>
RswitchBooleanOn
(Function<Branches<MqlBoolean>, ? extends BranchesTerminal<MqlBoolean, ? extends R>> mapping) The result of applying the provided switch mapping tothis
value.Methods inherited from interface com.mongodb.client.model.mql.MqlValue
asString, eq, equals, gt, gte, isArrayOr, isBooleanOr, isDateOr, isDocumentOr, isIntegerOr, isMapOr, isNumberOr, isStringOr, lt, lte, ne, passTo, switchOn
-
Method Details
-
not
MqlBoolean not()The logical negation ofthis
value.- Returns:
- the resulting value.
-
or
The logical conjunction ofthis
and theother
value.- Parameters:
other
- the other boolean value.- Returns:
- the resulting value.
-
and
The logical disjunction ofthis
and theother
value.- Parameters:
other
- the other boolean value.- Returns:
- the resulting value.
-
cond
TheifTrue
value whenthis
is true, and theifFalse
value otherwise.- Type Parameters:
T
- The type of the resulting value.- Parameters:
ifTrue
- the ifTrue value.ifFalse
- the ifFalse value.- Returns:
- the resulting value.
-
passBooleanTo
The result of passingthis
value to the provided function. Equivalent tof.apply(this)
, and allows lambdas and static, user-defined functions to use the chaining syntax.- Type Parameters:
R
- the type of the resulting value.- Parameters:
f
- the function to apply.- Returns:
- the resulting value.
- See Also:
-
switchBooleanOn
<R extends MqlValue> R switchBooleanOn(Function<Branches<MqlBoolean>, ? extends BranchesTerminal<MqlBoolean, ? extends R>> mapping) The result of applying the provided switch mapping tothis
value.- Type Parameters:
R
- the type of the resulting value.- Parameters:
mapping
- the switch mapping.- Returns:
- the resulting value.
- See Also:
-