@@ -236,7 +236,7 @@ private boolean usesCriteriaDefinition() {
236
236
*
237
237
* @author Mark Paluch
238
238
* @see <a href=
239
- * "https://docs.mongodb.com/manual/reference/operator/aggregation/ifNull/">https://docs.mongodb.com/manual/reference/operator/aggregation/ifNull/</a>
239
+ * "https://docs.mongodb.com/manual/reference/operator/aggregation/ifNull/">https://docs.mongodb.com/manual/reference/operator/aggregation/ifNull/</a>
240
240
*/
241
241
public static class IfNull implements AggregationExpression {
242
242
@@ -252,7 +252,8 @@ private IfNull(Object condition, Object value) {
252
252
/**
253
253
* Creates new {@link IfNull}.
254
254
*
255
- * @param fieldReference the field to check for a {@literal null} value, field reference must not be {@literal null}.
255
+ * @param fieldReference the field to check for a {@literal null} value, field reference must not be
256
+ * {@literal null}.
256
257
* @return never {@literal null}.
257
258
*/
258
259
public static ThenBuilder ifNull (String fieldReference ) {
@@ -265,7 +266,7 @@ public static ThenBuilder ifNull(String fieldReference) {
265
266
* Creates new {@link IfNull}.
266
267
*
267
268
* @param expression the expression to check for a {@literal null} value, field reference must not be
268
- * {@literal null}.
269
+ * {@literal null}.
269
270
* @return never {@literal null}.
270
271
*/
271
272
public static ThenBuilder ifNull (AggregationExpression expression ) {
@@ -283,8 +284,8 @@ public Document toDocument(AggregationOperationContext context) {
283
284
284
285
List <Object > list = new ArrayList <Object >();
285
286
286
- if (condition instanceof Collection ) {
287
- for (Object val : ((Collection )this .condition )) {
287
+ if (condition instanceof Collection ) {
288
+ for (Object val : ((Collection ) this .condition )) {
288
289
list .add (mapCondition (val , context ));
289
290
}
290
291
} else {
@@ -326,14 +327,14 @@ public interface IfNullBuilder {
326
327
327
328
/**
328
329
* @param fieldReference the field to check for a {@literal null} value, field reference must not be
329
- * {@literal null}.
330
+ * {@literal null}.
330
331
* @return the {@link ThenBuilder}
331
332
*/
332
333
ThenBuilder ifNull (String fieldReference );
333
334
334
335
/**
335
336
* @param expression the expression to check for a {@literal null} value, field name must not be {@literal null}
336
- * or empty.
337
+ * or empty.
337
338
* @return the {@link ThenBuilder}.
338
339
*/
339
340
ThenBuilder ifNull (AggregationExpression expression );
@@ -346,7 +347,8 @@ public interface IfNullBuilder {
346
347
public interface OrBuilder {
347
348
348
349
/**
349
- * @param fieldReference the field to check for a {@literal null} value, field reference must not be {@literal null}.
350
+ * @param fieldReference the field to check for a {@literal null} value, field reference must not be
351
+ * {@literal null}.
350
352
* @return the {@link ThenBuilder}
351
353
*/
352
354
ThenBuilder orIfNull (String fieldReference );
@@ -365,8 +367,8 @@ public interface ThenBuilder extends OrBuilder {
365
367
366
368
/**
367
369
* @param value the value to be used if the {@code $ifNull} condition evaluates {@literal true}. Can be a
368
- * {@link Document}, a value that is supported by MongoDB or a value that can be converted to a MongoDB
369
- * representation but must not be {@literal null}.
370
+ * {@link Document}, a value that is supported by MongoDB or a value that can be converted to a MongoDB
371
+ * representation but must not be {@literal null}.
370
372
* @return new instance of {@link IfNull}.
371
373
*/
372
374
IfNull then (Object value );
@@ -499,7 +501,7 @@ public static Switch switchCases(CaseOperator... conditions) {
499
501
public static Switch switchCases (List <CaseOperator > conditions ) {
500
502
501
503
Assert .notNull (conditions , "Conditions must not be null!" );
502
- return new Switch (Collections .<String , Object >singletonMap ("branches" , new ArrayList <CaseOperator >(conditions )));
504
+ return new Switch (Collections .<String , Object > singletonMap ("branches" , new ArrayList <CaseOperator >(conditions )));
503
505
}
504
506
505
507
/**
@@ -586,7 +588,7 @@ public interface ThenBuilder {
586
588
* @author Mark Paluch
587
589
* @author Christoph Strobl
588
590
* @see <a href=
589
- * "https://docs.mongodb.com/manual/reference/operator/aggregation/cond/">https://docs.mongodb.com/manual/reference/operator/aggregation/cond/</a>
591
+ * "https://docs.mongodb.com/manual/reference/operator/aggregation/cond/">https://docs.mongodb.com/manual/reference/operator/aggregation/cond/</a>
590
592
*/
591
593
public static class Cond implements AggregationExpression {
592
594
@@ -847,8 +849,8 @@ public interface ThenBuilder {
847
849
848
850
/**
849
851
* @param value the value to be used if the condition evaluates {@literal true}. Can be a {@link Document}, a
850
- * value that is supported by MongoDB or a value that can be converted to a MongoDB representation but
851
- * must not be {@literal null}.
852
+ * value that is supported by MongoDB or a value that can be converted to a MongoDB representation but
853
+ * must not be {@literal null}.
852
854
* @return the {@link OtherwiseBuilder}
853
855
*/
854
856
OtherwiseBuilder then (Object value );
@@ -873,8 +875,8 @@ public interface OtherwiseBuilder {
873
875
874
876
/**
875
877
* @param value the value to be used if the condition evaluates {@literal false}. Can be a {@link Document}, a
876
- * value that is supported by MongoDB or a value that can be converted to a MongoDB representation but
877
- * must not be {@literal null}.
878
+ * value that is supported by MongoDB or a value that can be converted to a MongoDB representation but
879
+ * must not be {@literal null}.
878
880
* @return the {@link Cond}
879
881
*/
880
882
Cond otherwise (Object value );
@@ -902,8 +904,7 @@ static class ConditionalExpressionBuilder implements WhenBuilder, ThenBuilder, O
902
904
private @ Nullable Object condition ;
903
905
private @ Nullable Object thenValue ;
904
906
905
- private ConditionalExpressionBuilder () {
906
- }
907
+ private ConditionalExpressionBuilder () {}
907
908
908
909
/**
909
910
* Creates a new builder for {@link Cond}.
0 commit comments