Skip to content

Commit 74654cd

Browse files
committed
Polishing.
Refine naming. Reformat code. Original pull request: #4858 See #4857
1 parent d870026 commit 74654cd

File tree

1 file changed

+15
-13
lines changed
  • spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation

1 file changed

+15
-13
lines changed

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ArrayOperators.java

+15-13
Original file line numberDiff line numberDiff line change
@@ -1025,22 +1025,23 @@ public static Slice sliceArrayOf(Collection<?> values) {
10251025
/**
10261026
* Slice the number of elements.
10271027
*
1028-
* @param nrElements elements to slice.
1028+
* @param count number of elements to slice.
10291029
* @return new instance of {@link Slice}.
10301030
*/
1031-
public Slice itemCount(int nrElements) {
1032-
return new Slice(append(nrElements));
1031+
public Slice itemCount(int count) {
1032+
return new Slice(append(count));
10331033
}
10341034

10351035
/**
10361036
* Slice the number of elements.
10371037
*
1038-
* @param nrElements An {@link AggregationExpression} that evaluates to a numeric value used as item count.
1038+
* @param count an {@link AggregationExpression} that evaluates to a numeric value used as number of elements to
1039+
* slice.
10391040
* @return new instance of {@link Slice}.
10401041
* @since 4.5
10411042
*/
1042-
public Slice itemCount(AggregationExpression nrElements) {
1043-
return new Slice(append(nrElements));
1043+
public Slice itemCount(AggregationExpression count) {
1044+
return new Slice(append(count));
10441045
}
10451046

10461047
/**
@@ -1075,24 +1076,25 @@ public class SliceElementsBuilder {
10751076
}
10761077

10771078
/**
1078-
* Set the number of elements given {@literal nrElements}.
1079+
* Set the number of elements given {@literal count}.
10791080
*
1080-
* @param nrElements
1081+
* @param count number of elements to slice.
10811082
* @return new instance of {@link Slice}.
10821083
*/
1083-
public Slice itemCount(int nrElements) {
1084-
return new Slice(append(position)).itemCount(nrElements);
1084+
public Slice itemCount(int count) {
1085+
return new Slice(append(position)).itemCount(count);
10851086
}
10861087

10871088
/**
10881089
* Slice the number of elements.
10891090
*
1090-
* @param nrElements An {@link AggregationExpression} that evaluates to a numeric value used as item count.
1091+
* @param count an {@link AggregationExpression} that evaluates to a numeric value used as number of elements to
1092+
* slice.
10911093
* @return new instance of {@link Slice}.
10921094
* @since 4.5
10931095
*/
1094-
public Slice itemCount(AggregationExpression nrElements) {
1095-
return new Slice(append(position)).itemCount(nrElements);
1096+
public Slice itemCount(AggregationExpression count) {
1097+
return new Slice(append(position)).itemCount(count);
10961098
}
10971099
}
10981100
}

0 commit comments

Comments
 (0)