garydgregory commented on a change in pull request #91: Add drain method to
CollectionUtils
URL: https://github.com/apache/commons-collections/pull/91#discussion_r340430339
##########
File path: src/main/java/org/apache/commons/collections4/CollectionUtils.java
##########
@@ -1797,12 +1797,12 @@ public static int maxSize(final Collection<? extends
Object> coll) {
*
* @param <E> the type of object the {@link Collection} contains
* @param input the collection will be operated, can't be null
- * @param startIndex the start index to remove element, can't be less
than 0
- * @param endIndex the end index to remove, can't be less than startIndex
+ * @param startIndex the start index (inclusive) to remove element, can't
be less than 0
+ * @param endIndex the end index (inclusive) to remove, can't be less
than startIndex
Review comment:
I think we should make the end index **exclusive** to avoid confusion with
other APIs.
Note the API I previously referred:
https://docs.oracle.com/javase/8/docs/api/java/util/List.html#subList-int-int-
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services