Skip to content

Commit

Permalink
Polishing.
Browse files Browse the repository at this point in the history
Refine naming. Reformat code.

Original pull request: #4858
See #4857
  • Loading branch information
mp911de committed Jan 7, 2025
1 parent d870026 commit 74654cd
Showing 1 changed file with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1025,22 +1025,23 @@ public static Slice sliceArrayOf(Collection<?> values) {
/**
* 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));
}

/**
Expand Down Expand Up @@ -1075,24 +1076,25 @@ public class SliceElementsBuilder {
}

/**
* 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);
}
}
}
Expand Down

0 comments on commit 74654cd

Please sign in to comment.