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 ofthisand theothervalue.<T extends MqlValue>
Tcond(T ifTrue, T ifFalse) TheifTruevalue whenthisis true, and theifFalsevalue otherwise.not()The logical negation ofthisvalue.or(MqlBoolean other) The logical conjunction ofthisand theothervalue.<R extends MqlValue>
RpassBooleanTo(Function<? super MqlBoolean, ? extends R> f) The result of passingthisvalue 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 tothisvalue.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 ofthisvalue.- Returns:
- the resulting value.
-
or
The logical conjunction ofthisand theothervalue.- Parameters:
other- the other boolean value.- Returns:
- the resulting value.
-
and
The logical disjunction ofthisand theothervalue.- Parameters:
other- the other boolean value.- Returns:
- the resulting value.
-
cond
TheifTruevalue whenthisis true, and theifFalsevalue 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 passingthisvalue 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 tothisvalue.- Type Parameters:
R- the type of the resulting value.- Parameters:
mapping- the switch mapping.- Returns:
- the resulting value.
- See Also:
-