You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2019/07/05 15:39:00 UTC

[jira] [Updated] (COLLECTIONS-674) Add Collections Drain Method

     [ https://issues.apache.org/jira/browse/COLLECTIONS-674?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Gregory updated COLLECTIONS-674:
-------------------------------------
    Priority: Major  (was: Trivial)

Marking as 'Major' since this a new API request.

> Add Collections Drain Method
> ----------------------------
>
>                 Key: COLLECTIONS-674
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-674
>             Project: Commons Collections
>          Issue Type: Improvement
>          Components: Collection
>    Affects Versions: 4.1
>            Reporter: David Mollitor
>            Priority: Major
>
> Add a {{Collections.drain()}} method which removes the first N elements from the collection and returns them.  This method would have the side-effect of modifying the input collections (due to removal).
>  
> {code:java}
> // Some suggestions
> void Collections.drain(Collection<T> from, Collection<T> to, int count);
> Collection<t> Collections.drain(Collection<t> from, int count);{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)