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

Thomas Neidhart commented on COLLECTIONS-466:
---------------------------------------------

hmm the classes in functor package always use size() on the input collection to 
create an array of appropriate length. We could iterate over the elements, put 
them into a list and then convert the list to an array, but I am not sure if it 
is worth the effort.
                
> Replace Collection with Iterable where applicable in the API
> ------------------------------------------------------------
>
>                 Key: COLLECTIONS-466
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-466
>             Project: Commons Collections
>          Issue Type: Improvement
>            Reporter: Thomas Neidhart
>             Fix For: 4.0
>
>
> There are still several places in the API which take a Collection as input 
> but could be much more useful if replaced with an Iterable.
> Examples:
>  * many of the functor classes have a static factory method to add a 
> collection of predicates:
> {noformat}
>    public static <T> Predicate<T> anyPredicate(final Collection<? extends 
> Predicate<T>> predicates)
>    
>    should better be
>    public static <T> Predicate<T> anyPredicate(final Iterable<? extends 
> Predicate<T>> predicates) {
> {noformat}
>  * CollectionUtils: forAllDo, collate, select ...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to