From 74654cd7c788cdc53b05afe892607396a00f50a2 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 7 Jan 2025 14:46:38 +0100 Subject: [PATCH] Polishing. Refine naming. Reformat code. Original pull request: #4858 See #4857 --- .../core/aggregation/ArrayOperators.java | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ArrayOperators.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ArrayOperators.java index 068b5bf71..f60148270 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ArrayOperators.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ArrayOperators.java @@ -1025,22 +1025,23 @@ public class ArrayOperators { /** * Slice the number of elements. * - * @param nrElements elements to slice. + * @param count number of elements to slice. * @return new instance of {@link Slice}. */ - public Slice itemCount(int nrElements) { - return new Slice(append(nrElements)); + public Slice itemCount(int count) { + return new Slice(append(count)); } /** * Slice the number of elements. * - * @param nrElements An {@link AggregationExpression} that evaluates to a numeric value used as item count. + * @param count an {@link AggregationExpression} that evaluates to a numeric value used as number of elements to + * slice. * @return new instance of {@link Slice}. * @since 4.5 */ - public Slice itemCount(AggregationExpression nrElements) { - return new Slice(append(nrElements)); + public Slice itemCount(AggregationExpression count) { + return new Slice(append(count)); } /** @@ -1075,24 +1076,25 @@ public class ArrayOperators { } /** - * Set the number of elements given {@literal nrElements}. + * Set the number of elements given {@literal count}. * - * @param nrElements + * @param count number of elements to slice. * @return new instance of {@link Slice}. */ - public Slice itemCount(int nrElements) { - return new Slice(append(position)).itemCount(nrElements); + public Slice itemCount(int count) { + return new Slice(append(position)).itemCount(count); } /** * Slice the number of elements. * - * @param nrElements An {@link AggregationExpression} that evaluates to a numeric value used as item count. + * @param count an {@link AggregationExpression} that evaluates to a numeric value used as number of elements to + * slice. * @return new instance of {@link Slice}. * @since 4.5 */ - public Slice itemCount(AggregationExpression nrElements) { - return new Slice(append(position)).itemCount(nrElements); + public Slice itemCount(AggregationExpression count) { + return new Slice(append(position)).itemCount(count); } } }