commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COLLECTIONS-405) Add ListUtils.select()
Date Sat, 23 Jun 2012 18:17:42 GMT

    [ https://issues.apache.org/jira/browse/COLLECTIONS-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13400006#comment-13400006
] 

Thomas Neidhart commented on COLLECTIONS-405:
---------------------------------------------

There is also another CollectionUtils.select method that allows you to provide the returned
collection:

{noformat}
List<Integer> input = new ArrayList<Integer>();
List<Integer> output = CollectionUtils.select(input, TruePredicate.truePredicate(),
new ArrayList<Integer>());
{noformat}

Does this help?
                
> Add ListUtils.select()
> ----------------------
>
>                 Key: COLLECTIONS-405
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-405
>             Project: Commons Collections
>          Issue Type: Wish
>    Affects Versions: 3.2.1
>            Reporter: Adam Dyga
>
> It would be nice to have ListUtils.select() method, similar to CollectionUtils.select().
The main difference would be the type returned (List vs Collection).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message